* RE: GDB step command crashed on non-stop mode
@ 2013-05-22 9:00 XIAO Wei si A
2013-05-22 14:48 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: XIAO Wei si A @ 2013-05-22 9:00 UTC (permalink / raw)
To: gdb
Hello,
I am using GDB non-stop mode to debug a multi-thread application. But it always crashed when I use "step" command. I have tried version 7.4/7.5.1/7.6, there result are same. The issue does not exist if we don't use non-stop mode.
I have written a small program to test, easy to reproduce each time. The code as below:
// test.cc
#include <string>
using namespace std;
void fun(string &str1, string &str2)
{
str1 += str2;
}
int main(void)
{
string str1 = "abc";
string str2 = "def";
fun(str1,str2);
return 0;
}
Compile:
g++ -g test.cc -o test
The procedure for reproduce as below:
vm10-0-0-1:/root-# gdb ./test
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/test...done.
(gdb) set target-async 1
(gdb) set non-stop on
(gdb) break fun
Breakpoint 1 at 0x4007b4: file test.cc, line 5.
(gdb) run
Starting program: /root/test
Breakpoint 1, fun (str1=..., str2=...) at test.cc:5
5 str1 += str2;
(gdb) step
6 }
(gdb) step
Program received signal SIGSEGV, Segmentation fault.
fun (str1=<error reading variable: Cannot access memory at address 0xfffffffffffffff8>, str1@entry=<error reading variable: Cannot access memory at address 0x8>,
str2=<error reading variable: Cannot access memory at address 0xfffffffffffffff0>, str2@entry=<error reading variable: Cannot access memory at address 0x8>) at test.cc:6
6 }
(gdb)
Does anyone know the root cause?
Thanks in advance,
Weisi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB step command crashed on non-stop mode
2013-05-22 9:00 GDB step command crashed on non-stop mode XIAO Wei si A
@ 2013-05-22 14:48 ` Tom Tromey
2013-05-23 5:32 ` XIAO Wei si A
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2013-05-22 14:48 UTC (permalink / raw)
To: XIAO Wei si A; +Cc: gdb
>> Does anyone know the root cause?
I don't. I was able to reproduce the problem, though.
Could you please file this in bugzilla?
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: GDB step command crashed on non-stop mode
2013-05-22 14:48 ` Tom Tromey
@ 2013-05-23 5:32 ` XIAO Wei si A
0 siblings, 0 replies; 3+ messages in thread
From: XIAO Wei si A @ 2013-05-23 5:32 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
Thanks Tom, I filed this in bugzilla:
http://sourceware.org/bugzilla/show_bug.cgi?id=15520
-----Original Message-----
From: Tom Tromey [mailto:tromey@redhat.com]
Sent: 2013年5月22日 22:49
To: XIAO Wei si A
Cc: gdb@sourceware.org
Subject: Re: GDB step command crashed on non-stop mode
>> Does anyone know the root cause?
I don't. I was able to reproduce the problem, though.
Could you please file this in bugzilla?
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-23 5:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 9:00 GDB step command crashed on non-stop mode XIAO Wei si A
2013-05-22 14:48 ` Tom Tromey
2013-05-23 5:32 ` XIAO Wei si A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox