diff options
author | Keith Seitz <keiths@redhat.com> | 2002-01-13 20:19:28 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2002-01-13 20:19:28 +0000 |
commit | ba4bbdcb1e10a16568e1574924f54ef73b918dac (patch) | |
tree | 4a0fe04e727490d3030c6fa740b4726405406630 /gdb | |
parent | 575bbeb6ee26c1636794bcd1b3122e485415da58 (diff) | |
download | gdb-ba4bbdcb1e10a16568e1574924f54ef73b918dac.zip gdb-ba4bbdcb1e10a16568e1574924f54ef73b918dac.tar.gz gdb-ba4bbdcb1e10a16568e1574924f54ef73b918dac.tar.bz2 |
* stack.c (print_frame_info_base): Print the frame's pc
only if when print_frame_info_listing_hook is not defined.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/stack.c | 29 |
2 files changed, 25 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9099360..00c6701 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2002-01-13 Keith Seitz <keiths@redhat.com> + * stack.c (print_frame_info_base): Print the frame's pc + only if when print_frame_info_listing_hook is not defined. + +2002-01-13 Keith Seitz <keiths@redhat.com> + * varobj.c (varobj_set_value): Make sure that there were no errors evaluating the object before attempting to set its value. diff --git a/gdb/stack.c b/gdb/stack.c index 8300c65..007ddad 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -399,20 +399,31 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args) fi->pc); if (!done) { - if (addressprint && mid_statement) + if (print_frame_info_listing_hook) + print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0); + else { + /* We used to do this earlier, but that is clearly + wrong. This function is used by many different + parts of gdb, including normal_stop in infrun.c, + which uses this to print out the current PC + when we stepi/nexti into the middle of a source + line. Only the command line really wants this + behavior. Other UIs probably would like the + ability to decide for themselves if it is desired. */ + if (addressprint && mid_statement) + { #ifdef UI_OUT - ui_out_field_core_addr (uiout, "addr", fi->pc); - ui_out_text (uiout, "\t"); + ui_out_field_core_addr (uiout, "addr", fi->pc); + ui_out_text (uiout, "\t"); #else - print_address_numeric (fi->pc, 1, gdb_stdout); - printf_filtered ("\t"); + print_address_numeric (fi->pc, 1, gdb_stdout); + printf_filtered ("\t"); #endif + } + + print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); } - if (print_frame_info_listing_hook) - print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0); - else - print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); } current_source_line = max (sal.line - lines_to_list / 2, 1); } |