public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/55209] New: gdb reports 'No symbol "<x>" in current context.' at -O0 -g
@ 2012-11-05  1:19 hp at gcc dot gnu.org
  2012-11-05  1:20 ` [Bug debug/55209] " hp at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2012-11-05  1:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55209

             Bug #: 55209
           Summary: gdb reports 'No symbol "<x>" in current context.' at
                    -O0 -g
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
            Target: x86_64-linux


At revision r192677, I have problems debugging cse1, as a local variable is
gone at -O0 -g3.

To repeat, just bootstrap, then "rm cse.o" and "make cc1 CXXFLAGS=-g3".  Enter
gdb-7.5 for cc1 with a suitable command-line (for example "-fpreprocessed
pr55030-chk.i -quiet -dumpbase pr55030-chk.c -m32 -mtune=generic -march=x86-64
-auxbase pr55030-chk -Os -w -version -fno-diagnostics-show-caret
-fno-tree-loop-distribute-patterns -o pr55030-chk.s" with the attached
pr55030-chk.i, but this is not important)

Set a breakpoint on line 5084 (at r192677 it says "if (MEM_P (trial) && MEM_P
(SET_DEST (sets[i].rtl)))").  When the breakpoint hits, do "p trial".  gdb will
respond with 'No symbol "trial" in current context.'

PS. you might want to build gdb-7.5 with "--without-auto-load-safe-path" or add
"add-auto-load-safe-path /home" to your ~/.gdbinit, assuming your gcc-trees are
under your user home directory.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug debug/55209] gdb reports 'No symbol "<x>" in current context.' at -O0 -g
  2012-11-05  1:19 [Bug debug/55209] New: gdb reports 'No symbol "<x>" in current context.' at -O0 -g hp at gcc dot gnu.org
@ 2012-11-05  1:20 ` hp at gcc dot gnu.org
  2012-11-05  1:21 ` hp at gcc dot gnu.org
  2012-11-05  1:29 ` hp at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2012-11-05  1:20 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55209

--- Comment #1 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-11-05 01:20:08 UTC ---
Created attachment 28616
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28616
pr55030-chk.i


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug debug/55209] gdb reports 'No symbol "<x>" in current context.' at -O0 -g
  2012-11-05  1:19 [Bug debug/55209] New: gdb reports 'No symbol "<x>" in current context.' at -O0 -g hp at gcc dot gnu.org
  2012-11-05  1:20 ` [Bug debug/55209] " hp at gcc dot gnu.org
@ 2012-11-05  1:21 ` hp at gcc dot gnu.org
  2012-11-05  1:29 ` hp at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2012-11-05  1:21 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55209

--- Comment #2 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-11-05 01:21:23 UTC ---
(In reply to comment #0)
> Set a breakpoint on line 5084
...in cse.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug debug/55209] gdb reports 'No symbol "<x>" in current context.' at -O0 -g
  2012-11-05  1:19 [Bug debug/55209] New: gdb reports 'No symbol "<x>" in current context.' at -O0 -g hp at gcc dot gnu.org
  2012-11-05  1:20 ` [Bug debug/55209] " hp at gcc dot gnu.org
  2012-11-05  1:21 ` hp at gcc dot gnu.org
@ 2012-11-05  1:29 ` hp at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2012-11-05  1:29 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55209

--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-11-05 01:29:05 UTC ---
Similarly at line 5261 do "p src".


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-05  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-05  1:19 [Bug debug/55209] New: gdb reports 'No symbol "<x>" in current context.' at -O0 -g hp at gcc dot gnu.org
2012-11-05  1:20 ` [Bug debug/55209] " hp at gcc dot gnu.org
2012-11-05  1:21 ` hp at gcc dot gnu.org
2012-11-05  1:29 ` hp at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).