From: "Martin M. Hunt" <hunt@redhat.com>
To: gdb-patches@sources.redhat.com,
Insight Mailing List <insight@sources.redhat.com>
Subject: [RFA] print_frame_info_listing_hook cleanup
Date: Wed, 06 Feb 2002 12:29:00 -0000 [thread overview]
Message-ID: <200202062029.MAA12908@cygnus.com> (raw)
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.
next reply other threads:[~2002-02-06 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-06 12:29 Martin M. Hunt [this message]
2002-02-12 22:43 ` Andrew Cagney
2002-02-13 23:26 ` Martin M. Hunt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200202062029.MAA12908@cygnus.com \
--to=hunt@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox