summaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-10-09 19:30:25 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-10-09 19:30:25 +0000
commit93d86cefdf1902d003f0d54f27777b8ea4f75b13 (patch)
tree1ecbc64a37b1187f691243e03176a92e98bf574b /gdb/frame.h
parent2d6c5dc2c7f35f46bdbcee6ea442a97ae880db4b (diff)
gdb/
Code reshuffle. * frame.h (struct frame_arg): New definition. (read_frame_arg): New declaration. * mi/mi-cmd-stack.c (list_arg_or_local): New functiom from ... (list_args_or_locals): ... the code here. New variable arg, call read_frame_arg and list_arg_or_local with it. Unify the PRINT_SIMPLE_VALUES and PRINT_ALL_VALUES cases. Call xfree for arg.error. * stack.c (print_frame_arg): New functiom from the code of print_frame_args. (read_frame_arg): New function. (print_frame_args): Remove variable val. New variable arg, call read_frame_arg and print_frame_arg with it. Call xfree for arg.error.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r--gdb/frame.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index 6a1e711198..3850e11fd2 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -711,6 +711,26 @@ extern int frame_register_read (struct frame_info *frame, int regnum,
gdb_byte *buf);
/* From stack.c. */
+
+/* Inferior function parameter value read in from a frame. */
+
+struct frame_arg
+{
+ /* Symbol for this parameter used for example for its name. */
+ struct symbol *sym;
+
+ /* Value of the parameter. It is NULL if ERROR is not NULL; if both VAL and
+ ERROR are NULL this parameter's value should not be printed. */
+ struct value *val;
+
+ /* String containing the error message, it is more usually NULL indicating no
+ error occured reading this parameter. */
+ char *error;
+};
+
+extern void read_frame_arg (struct symbol *sym, struct frame_info *frame,
+ struct frame_arg *argp);
+
extern void args_info (char *, int);
extern void locals_info (char *, int);