This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 150742 - gdb randomly loses track of a variable
gdb randomly loses track of a variable
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
:
Depends On:
Blocks: FC5Target
  Show dependency treegraph
 
Reported: 2005-03-09 22:38 EST by Bill Nottingham
Modified: 2014-03-16 22:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-28 00:55:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2005-03-09 22:38:44 EST
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-27 21:45:58 EDT
Adding Tracking keyword
Comment 3 Jan Kratochvil 2008-03-28 00:55:07 EDT
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.