From: Steven Johnson <sjohnson@sakuraindustries.com>
To: gdb-patches@sourceware.org
Subject: psymtab not in symtab warning patch
Date: Sun, 11 Jun 2006 06:34:00 -0000 [thread overview]
Message-ID: <448BB966.3050200@sakuraindustries.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
Hi,
Please consider the attached patch.
It allows the "PC 0x??? in psymtab but not in symtab" warning to be
"toggled off". The reason for this, is for whatever reason I get it
heaps with my PPC Assembler code. There doesn't appear to be any
obvious incantation to control it or prevent it when building the asm
files, so i've given up trying. The attached patch retains the current
behaviour, but if someone is being inundated by the warning, which
happens when it occurs, they can turn it off, and at least continue
debugging OK.
Obviously finding out why it happens is far better, but i know nothing
about dwarf debug information, or the psymtab or symtab stuff, so i'm
not going to be productive in finding a better answer.
This patch is against GDB 6.4
Steven J
[-- Attachment #2: gdb-6.4-switchable-symtab-warning.patch --]
[-- Type: text/x-patch, Size: 2138 bytes --]
diff -Naur gdb-6.4/gdb/symtab.c gdb-6.4-no-symtab-warning/gdb/symtab.c
--- gdb-6.4/gdb/symtab.c 2005-03-08 15:34:44.000000000 +1100
+++ gdb-6.4-no-symtab-warning/gdb/symtab.c 2006-06-11 16:52:11.000000000 +1100
@@ -144,6 +144,23 @@
const struct block *block_found;
+/* A State variable to allow the "psymtab not in symtab" warning to
+ be toggled off if it produces copious unproductive warnings.
+ Note: It is better to resolve the warning than toggle it off,
+ this facility is only here for the cases where it can't be
+ resolved, yet causes no apparent problems. Defaults to ON. */
+int psymtab_not_in_symtab_warning = 1;
+
+static void
+ show_psymtab_not_in_symtab_warning (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("\
+The 'psymtab not in symtab' warning is %s.\n"),
+ value);
+}
+
+
/* Check for a symtab of a specific name; first in symtabs, then in
psymtabs. *If* there is no '/' in the name, a match after a '/'
in the symtab filename will also work. */
@@ -1920,7 +1937,7 @@
ps = find_pc_sect_psymtab (pc, section);
if (ps)
{
- if (ps->readin)
+ if ((ps->readin) && psymtab_not_in_symtab_warning)
/* Might want to error() here (in case symtab is corrupt and
will cause a core dump), but maybe we can successfully
continue, so let's not. */
@@ -4185,6 +4202,17 @@
All global and static variable names, or those matching REGEXP."));
}
+ add_setshow_boolean_cmd ("psymtab-not-in-symtab-warning",
+ class_support,
+ &psymtab_not_in_symtab_warning,
+ _("\
+Set psymtab not in symtab warning to be generated."), _("\
+Show psymtab not in symtab warning to be generated."), NULL,
+ NULL,
+ show_psymtab_not_in_symtab_warning,
+ &setlist, &showlist);
+
+
/* Initialize the one built-in type that isn't language dependent... */
builtin_type_error = init_type (TYPE_CODE_ERROR, 0, 0,
"<unknown type>", (struct objfile *) NULL);
next reply other threads:[~2006-06-11 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-11 6:34 Steven Johnson [this message]
2006-06-13 23:13 ` Jim Blandy
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=448BB966.3050200@sakuraindustries.com \
--to=sjohnson@sakuraindustries.com \
--cc=gdb-patches@sourceware.org \
/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