diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-09-30 10:29:00 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-09-30 10:29:00 +0000 |
commit | e9e07ba6db5fb651b153da7bde8a6ee4509172f0 (patch) | |
tree | 7745602161672924ea8e9d06ef6ecebfe450ecf2 /gdb/stack.c | |
parent | cd2effb255e6018687256a2d10072a1e4da0c6c5 (diff) | |
download | binutils-gdb-e9e07ba6db5fb651b153da7bde8a6ee4509172f0.tar.gz |
gdb/
Fix printing parameters of inlined functions.
* ada-lang.c (is_known_support_routine)
(ada_unhandled_exception_name_addr_from_raise): Provide NULL parameter
for find_frame_funname.
* python/py-frame.c (frapy_name): Likewise.
* stack.c (find_frame_funname): New parameter funcp. Update the
function comment. Fill it in.
(print_frame): New variable func. Initialize it by
find_frame_funname. Print arguments only if FUNC is not NULL. Use
FUNC as the parameter of print_args_stub.
* stack.h (find_frame_funname): New parameter funcp. Remove the
function declaration comment.
gdb/testsuite/
Fix printing parameters of inlined functions.
* gdb.dwarf2/dw2-inline-param.exp: New file.
* gdb.dwarf2/dw2-inline-param-main.c: New file.
* gdb.dwarf2/dw2-inline-param.S: New file.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 830fd41c7cf..1e0c2e6f2cd 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -661,16 +661,19 @@ print_frame_info (struct frame_info *frame, int print_level, gdb_flush (gdb_stdout); } -/* Attempt to obtain the FUNNAME and FUNLANG of the function corresponding - to FRAME. */ +/* Attempt to obtain the FUNNAME, FUNLANG and optionally FUNCP of the function + corresponding to FRAME. */ + void find_frame_funname (struct frame_info *frame, char **funname, - enum language *funlang) + enum language *funlang, struct symbol **funcp) { struct symbol *func; *funname = NULL; *funlang = language_unknown; + if (funcp) + *funcp = NULL; func = get_frame_function (frame); if (func) @@ -715,6 +718,8 @@ find_frame_funname (struct frame_info *frame, char **funname, { *funname = SYMBOL_PRINT_NAME (func); *funlang = SYMBOL_LANGUAGE (func); + if (funcp) + *funcp = func; if (*funlang == language_cplus) { /* It seems appropriate to use SYMBOL_PRINT_NAME() here, @@ -756,11 +761,12 @@ print_frame (struct frame_info *frame, int print_level, struct ui_stream *stb; struct cleanup *old_chain, *list_chain; struct value_print_options opts; + struct symbol *func; stb = ui_out_stream_new (uiout); old_chain = make_cleanup_ui_out_stream_delete (stb); - find_frame_funname (frame, &funname, &funlang); + find_frame_funname (frame, &funname, &funlang, &func); annotate_frame_begin (print_level ? frame_relative_level (frame) : 0, gdbarch, get_frame_pc (frame)); @@ -797,7 +803,7 @@ print_frame (struct frame_info *frame, int print_level, struct cleanup *args_list_chain; args.frame = frame; - args.func = find_pc_function (get_frame_address_in_block (frame)); + args.func = func; args.stream = gdb_stdout; args_list_chain = make_cleanup_ui_out_list_begin_end (uiout, "args"); catch_errors (print_args_stub, &args, "", RETURN_MASK_ERROR); |