This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] multi-executable support
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 12 Nov 2009 17:09:34 -0800
- Subject: Re: [commit] multi-executable support
- References: <200910191106.28905.pedro@codesourcery.com>
On Mon, Oct 19, 2009 at 2:06 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> 2009-10-19 ?Pedro Alves ?<pedro@codesourcery.com>
> ? ? ? ? ? ?Stan Shebs ?<stan@codesourcery.com>
>
> ? ? ? ?Add base multi-executable/process support to GDB.
This appears to be triggering an assert for me:
struct Foo {
Foo();
Foo(const char *);
const char *bar();
const char *x;
};
Foo::Foo(const char *y)
{
x = y;
}
Foo::Foo()
{
x = "Hello";
}
const char *
Foo::bar()
{
return x;
}
int main()
{
int x = 1;
Foo f("abc");
const char *s = f.bar();
}
g++ -g foo.cc && gdb-cvs ./a.out
GNU gdb (GDB) 7.0.50.20091113-cvs
...
This GDB was configured as "x86_64-unknown-linux-gnu".
Reading symbols from /usr/local/google/tmp/b1844402/a.out...done.
(gdb) b Foo::Foo
../../src/gdb/breakpoint.c:4789: internal-error: set_raw_breakpoint:
Assertion `sal.pspace != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Aborted (core dumped)
The crash is here:
#0 0x00007f72aeaee095 in raise () from /lib/libc.so.6
#1 0x00007f72aeaefaf0 in abort () from /lib/libc.so.6
#2 0x0000000000460c25 in internal_vproblem (problem=0xab3e90,
file=0x731a26 "../../src/gdb/breakpoint.c", line=4789, fmt=0x7319f2
"%s: Assertion `%s' failed.", ap=0x7fffb7c81ae0) at
../../src/gdb/utils.c:969
#3 0x0000000000460c82 in internal_verror (file=0x731a26
"../../src/gdb/breakpoint.c", line=4789, fmt=0x7319f2 "%s: Assertion
`%s' failed.", ap=0x7fffb7c81ae0) at ../../src/gdb/utils.c:994
#4 0x0000000000460d74 in internal_error (file=0x731a26
"../../src/gdb/breakpoint.c", line=4789, string=0x7319f2 "%s:
Assertion `%s' failed.") at ../../src/gdb/utils.c:1003
#5 0x00000000004f0623 in set_raw_breakpoint (gdbarch=0xc0e040,
sal=..., bptype=bp_breakpoint) at ../../src/gdb/breakpoint.c:4789
#6 0x00000000004f3126 in create_breakpoint (gdbarch=0xc0e040,
sals=..., addr_string=0xbffd70 "Foo", cond_string=0x0,
type=bp_breakpoint, disposition=disp_donttouch, thread=-1, task=0,
ignore_count=0, ops=0x0, from_tty=0,
enabled=1) at ../../src/gdb/breakpoint.c:6098
#7 0x00000000004f39f7 in create_breakpoints (gdbarch=0xc0e040,
sals=..., addr_string=0xbe9390, cond_string=0x0, type=bp_breakpoint,
disposition=disp_donttouch, thread=-1, task=0, ignore_count=0,
ops=0x0, from_tty=0, enabled=1)
at ../../src/gdb/breakpoint.c:6333
#8 0x00000000004f4439 in break_command_really (gdbarch=0xc0e040,
arg=0xae494a "", cond_string=0x0, thread=-1,
parse_condition_and_thread=1, tempflag=0, hardwareflag=0, traceflag=0,
ignore_count=0,
pending_break_support=AUTO_BOOLEAN_AUTO, ops=0x0, from_tty=0,
enabled=1) at ../../src/gdb/breakpoint.c:6663
#9 0x00000000004f4635 in break_command_1 (arg=0xae4942 "Foo::Foo",
flag=0, from_tty=0) at ../../src/gdb/breakpoint.c:6721
#10 0x00000000004f4912 in break_command (arg=0xae4942 "Foo::Foo",
from_tty=0) at ../../src/gdb/breakpoint.c:6846
The 'sal' in frame 5 looks bogus:
(gdb) p sal
$1 = {pspace = 0x0, symtab = 0x0, section = 0x0, line = 0, pc = 0, end
= 0, explicit_pc = 0, explicit_line = 0}
The official 7.0 release does something unreasonable as well:
Reading symbols from /usr/local/google/tmp/b1844402/a.out...done.
(gdb) b Foo::Foo
Breakpoint 1 at 0x0
Note: breakpoint 1 also set at pc 0x0.
Breakpoint 2 at 0x0
warning: Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
(gdb)
but didn't assert.
--
Paul Pluzhnikov