* [RFA] print_frame_info_listing_hook cleanup
@ 2002-02-06 12:29 Martin M. Hunt
2002-02-12 22:43 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Martin M. Hunt @ 2002-02-06 12:29 UTC (permalink / raw)
To: gdb-patches, Insight Mailing List
If print_frame_info_listing_hook is defined, print_source_lines()
does not get called from print_frame_info_base in stack.c.
print_source_lines() sets the global current_source_symtab, which
is evidently necessary to GDB. To fix this problem, the Insight
print_frame_info_listing_hook function sets current_source_symtab,
which seems very inappropriate. Therefore this proposed fix.
2002-02-06 Martin M. Hunt <hunt@redhat.com>
* stack.c (print_frame_info_base): When calling
print_frame_info_listing_hook, set current_source_symtab
2002-02-06 Martin M. Hunt <hunt@redhat.com>
* generic/gdbtk-hooks.c: Remove include of symtab.h.
(gdbtk_print_frame_info): Don't set GDB globals
current_source_symtab and current_source_line. Let
GDB do it.
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.28
diff -u -p -r1.28 stack.c
--- stack.c 2002/01/17 22:15:17 1.28
+++ stack.c 2002/02/06 10:15:04
@@ -400,7 +400,10 @@ print_frame_info_base (struct frame_info
if (!done)
{
if (print_frame_info_listing_hook)
- print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
+ {
+ print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
+ current_source_symtab = sal.symtab;
+ }
else
{
/* We used to do this earlier, but that is clearly
Index: gdbtk/generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.18
diff -u -p -r1.18 gdbtk-hooks.c
--- gdbtk-hooks.c 2001/08/16 15:48:14 1.18
+++ gdbtk-hooks.c 2002/02/06 10:15:04
@@ -22,7 +22,6 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "symtab.h"
#include "inferior.h"
#include "command.h"
#include "bfd.h"
@@ -707,8 +706,6 @@ gdbtk_print_frame_info (s, line, stoplin
int stopline;
int noerror;
{
- current_source_symtab = s;
- current_source_line = line;
}
/*
--
Martin Hunt
GDB Engineer
Red Hat, Inc.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] print_frame_info_listing_hook cleanup
2002-02-06 12:29 [RFA] print_frame_info_listing_hook cleanup Martin M. Hunt
@ 2002-02-12 22:43 ` Andrew Cagney
2002-02-13 23:26 ` Martin M. Hunt
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-02-12 22:43 UTC (permalink / raw)
To: Martin M. Hunt; +Cc: gdb-patches, Insight Mailing List
> 2002-02-06 Martin M. Hunt <hunt@redhat.com>
>
> * stack.c (print_frame_info_base): When calling
> print_frame_info_listing_hook, set current_source_symtab
>
> 2002-02-06 Martin M. Hunt <hunt@redhat.com>
>
> * generic/gdbtk-hooks.c: Remove include of symtab.h.
> (gdbtk_print_frame_info): Don't set GDB globals
> current_source_symtab and current_source_line. Let
> GDB do it.
>
Since, this only affects insights use of that hook, yes ok.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] print_frame_info_listing_hook cleanup
2002-02-12 22:43 ` Andrew Cagney
@ 2002-02-13 23:26 ` Martin M. Hunt
0 siblings, 0 replies; 3+ messages in thread
From: Martin M. Hunt @ 2002-02-13 23:26 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches, Insight Mailing List
On Tuesday 12 February 2002 10:43 pm, Andrew Cagney wrote:
> > 2002-02-06 Martin M. Hunt <hunt@redhat.com>
> >
> > * stack.c (print_frame_info_base): When calling
> > print_frame_info_listing_hook, set current_source_symtab
> >
> > 2002-02-06 Martin M. Hunt <hunt@redhat.com>
> >
> > * generic/gdbtk-hooks.c: Remove include of symtab.h.
> > (gdbtk_print_frame_info): Don't set GDB globals
> > current_source_symtab and current_source_line. Let
> > GDB do it.
>
> Since, this only affects insights use of that hook, yes ok.
>
> Andrew
Done. (I also had approval from Keith for Insight part)
--
Martin Hunt
GDB Engineer
Red Hat, Inc.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-14 7:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06 12:29 [RFA] print_frame_info_listing_hook cleanup Martin M. Hunt
2002-02-12 22:43 ` Andrew Cagney
2002-02-13 23:26 ` Martin M. Hunt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox