Bug 150742 - gdb randomly loses track of a variable
Summary: gdb randomly loses track of a variable
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2005-03-10 03:38 UTC by Bill Nottingham
Modified: 2014-03-17 02:52 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-28 04:55:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2005-03-10 03:38:44 UTC
Debugging cupsd.

Starting program: /tmp/cupsd -f
Breakpoint 2 at 0x7adae9: file main.c, line 274.
Breakpoint 3 at 0x7c486d: file printers.c, line 86.

Breakpoint 2, main (argc=2, argv=0xbfe08ae4) at main.c:274
274       for (i = 1; i < argc; i ++)
(gdb) cont
Continuing.

Breakpoint 3, AddPrinter (name=0xbfe03d8c "stylus") at printers.c:86
86        LogMessage(L_DEBUG2, "AddPrinter(\"%s\")", name ? name :
"(null)");
(gdb) display name
2: name = 0xbfe03d8c "stylus"
(gdb) next
88        if (name == NULL)
2: name = Variable "name" is not available.
Disabling display 2 to avoid infinite recursion.
(gdb) p name
Variable "name" is not available.
(gdb) i addr name
Symbol "name" is a variable with multiple locations.
(gdb)

Comment 2 Jon Stanley 2008-03-28 01:45:58 UTC
Adding Tracking keyword

Comment 3 Jan Kratochvil 2008-03-28 04:55:07 UTC
Jon, this is not a Tracking Bug, this is a real defect bugreport.

(In reply to comment #0)
> (gdb) next
> 88        if (name == NULL)
> 2: name = Variable "name" is not available.
> Disabling display 2 to avoid infinite recursion.

Not reproducible on F8:
  gdb-6.6-45.fc8.x86_64
  cups-1.3.6-2.fc8.x86_64

Breakpoint 1, cupsdAddPrinter (name=0x7fff6311fde0 "postscript") at printers.c:90
90      {
(gdb) display name
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
98        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddPrinter(\"%s\")", name);
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
90      {
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
98        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddPrinter(\"%s\")", name);
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
90      {
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
98        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddPrinter(\"%s\")", name);
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
104       if ((p = calloc(1, sizeof(cupsd_printer_t))) == NULL)
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
111       cupsdSetString(&p->name, name);
1: name = 0x7fff6311fde0 "postscript"


Still this minor problem is present (even in Rawhide + upstream HEAD):
(gdb) i addr name
Symbol "name" is a variable with multiple locations.



Note You need to log in before you can comment on or make changes to this bug.