This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20856] New: "backtrace full" hides variables?
- From: "adrian.oltean at nxp dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 23 Nov 2016 09:21:15 +0000
- Subject: [Bug gdb/20856] New: "backtrace full" hides variables?
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20856
Bug ID: 20856
Summary: "backtrace full" hides variables?
Product: gdb
Version: 7.11.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: adrian.oltean at nxp dot com
Target Milestone: ---
Created attachment 9662
--> https://sourceware.org/bugzilla/attachment.cgi?id=9662&action=edit
GDB logs and C sources for testing
I noticed a strange issue after upgrading to GDB 7.11.1. I have a set of static
variables that can be read with a print command (e.g. "print slchar") before
executing "backtrace full" but not after. Executing "print slchar" after the
"backtrace full" will display "No symbol "slchar" in current context.". Why
would "backtrace full" affect subsequent print commands and visibility of
variables?
I attached a set of logs for GDB 7.7.1, 7.10.1, 7.11.1 and 7.12 indicating the
problem was introduced after 7.10.1 release. I also attached the app I used for
testing - see dbg_simple_types_app.zip.
Steps to reproduce the problem:
1. Build GDB 7.11.1 on an x86 host
2. Compile the attached C source files from dbg_simple_types_app.zip.
gcc -g -o dbg_simple_types dbg_simple_types.c main.c
3. Start debugging the previously compiled app
fsr-ub1464-107:/data/DebugEnvs/gdb> gdb-7.12/gdb/gdb ./dbg_simple_types
4. "set pagination off" in GDB
5. "break dbg_simple_types.c:227" in GDB
6. "run" in GDB
7. With app stopped at line 227 in dbg_simple_types.c execute "print slchar".
Should be displayed "$1 = 1 '\001'"
8. "backtrace full" in GDB. Among all those variables, "slchar" should have
value "slchar = 1 '\001'"
9. Execute "print slchar" again. "No symbol "slchar" in current context." is
displayed. Expected result is "$1 = 1 '\001'".
--
You are receiving this mail because:
You are on the CC list for the bug.