- Fix some coding style issues in output.c
- Add a couple items to TODO
GDB supports python pretty printers. We migh want to hook this in
and use it to format certain types.
GDB supports python pretty printers. We migh want to hook this in
and use it to format certain types.
+** support new Linux kernel features
+ - PTRACE_SIEZE
+ - /proc/PID/map_files/* (but only root seems to be able to read
+ this as of now)
+
* BUGS
** After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p())
* BUGS
** After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p())
/*
* This file is part of ltrace.
/*
* This file is part of ltrace.
- * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2011,2012,2013,2014 Petr Machata, Red Hat Inc.
* Copyright (C) 2010 Joe Damato
* Copyright (C) 1997,1998,1999,2001,2002,2003,2004,2007,2008,2009 Juan Cespedes
* Copyright (C) 2006 Paul Gilliam, IBM Corporation
* Copyright (C) 2010 Joe Damato
* Copyright (C) 1997,1998,1999,2001,2002,2003,2004,2007,2008,2009 Juan Cespedes
* Copyright (C) 2006 Paul Gilliam, IBM Corporation
/* Fetch & enter into dictionary the retval first, so that
* other values can use it in expressions. */
struct value retval;
/* Fetch & enter into dictionary the retval first, so that
* other values can use it in expressions. */
struct value retval;
+ bool own_retval = false;
if (context != NULL) {
value_init(&retval, proc, NULL, func->return_info, 0);
if (context != NULL) {
value_init(&retval, proc, NULL, func->return_info, 0);
if (fetch_retval(context, type, proc, func->return_info,
&retval) < 0)
value_set_type(&retval, NULL, 0);
else if (stel->arguments != NULL
if (fetch_retval(context, type, proc, func->return_info,
&retval) < 0)
value_set_type(&retval, NULL, 0);
else if (stel->arguments != NULL
- && val_dict_push_named(stel->arguments, &retval,
- "retval", 0) == 0)
- own_retval = 0;
+ && val_dict_push_named(stel->arguments, &retval,
+ "retval", 0) == 0)
+ own_retval = false;
}
if (stel->arguments != NULL)
}
if (stel->arguments != NULL)
unw_init_remote(&cursor, proc->unwind_as, proc->unwind_priv);
while (unwind_depth) {
unw_init_remote(&cursor, proc->unwind_as, proc->unwind_priv);
while (unwind_depth) {
- own_retval = unw_get_reg(&cursor, UNW_REG_IP,
- (unw_word_t *) &ip);
- if (own_retval) {
+ int rc = unw_get_reg(&cursor, UNW_REG_IP,
+ (unw_word_t *) &ip);
+ if (rc < 0) {
fprintf(options.output, " > Error: %s\n",
fprintf(options.output, " > Error: %s\n",
- unw_strerror(own_retval));
- own_retval = unw_get_proc_name(&cursor, fn_name, sizeof(fn_name),
- (unw_word_t *) &function_offset);
- if ((own_retval == 0) || (own_retval == -UNW_ENOMEM))
+ rc = unw_get_proc_name(&cursor, fn_name,
+ sizeof(fn_name),
+ (unw_word_t *) &function_offset);
+ if (rc == 0 || rc == -UNW_ENOMEM)
fprintf(options.output, " > %s(%s+%p) [%p]\n",
lib_name, fn_name, function_offset, ip);
else
fprintf(options.output, " > %s(%s+%p) [%p]\n",
lib_name, fn_name, function_offset, ip);
else