This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/1845: Can't set breakpoint in included source file
- From: Jason dot Elbaum at freescale dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 12 Jan 2005 18:36:21 -0000
- Subject: gdb/1845: Can't set breakpoint in included source file
- Reply-to: Jason dot Elbaum at freescale dot com
>Number: 1845
>Category: gdb
>Synopsis: Can't set breakpoint in included source file
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 12 18:38:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: Jason.Elbaum@freescale.com
>Release: GNU gdb 6.3
>Organization:
>Environment:
SunOS gremlin 5.8 Generic_108528-23 sun4u sparc SUNW,Ultra-5_10
gcc version 2.95.3 20010315 (release)
This GDB was configured as "sparc-sun-solaris2.8".
>Description:
In the attached files, gdb will not set a breakpoint at test1.h:1
>How-To-Repeat:
Running gdb - list works, but break fails:
(gdb) list test1.h:1
1 return (c + d) ;
(gdb) break test1.h:1
No line 1 in file "test1.h".
Here are the three input files:
*** test.cc ***
#include <stdio.h>
class A {
public:
#include "test.h"
};
int main () {
A a;
printf ("Result: %d\n", a.add(6, 7));
}
*** test.h ***
unsigned int add(unsigned int c, unsigned int d) {
#include "test1.h"
}
*** test1.h ***
return (c + d) ;
>Fix:
I wish I knew!
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test1.h"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test1.h"
IHJldHVybiAoYyArIGQpIDsK