From: Dmitry Smirnov <divis1969@mail.ru>
To: gdb@sourceware.org
Subject: Re: How to catch GDB crash
Date: Thu, 26 Jun 2008 13:56:00 -0000 [thread overview]
Message-ID: <E1KBrxa-000GAv-00.divis1969-mail-ru@f149.mail.ru> (raw)
In-Reply-To: <200806260027.59248.pedro@codesourcery.com>
I still have some doubts :-)
Below is a new log of my debug session. I've set the same mi_execute_command and mi_on_resume. Last one prints the value of 'inferior_ptid' when hit. Also, from Eclipse I've issues command 'ni' before 'c'. As you can see, 'inferior_ptid' it is equal to {pid = 42000, lwp = 0, tid = 0} all the time whereas mi_on_resume is called with {pid = -1, lwp = 0, tid = 0} in all cases except last one.
On my mind it indicates that while executing last 'ni', function resume() in file infrun.c goes different way and it assigned 'inferior_ptid' to 'resume_ptid' instead of default RESUME_ALL.
Digging...
Dmitry
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
(gdb) attach 2348
Attaching to process 2348
Reading symbols from /cygdrive/d/Install/GDB/gdb-6.8.50.20080620/gdb-6.8.50.2008
0620/gdb/gdb.exe...done.
[Switching to thread 2348.0x15bc]
(gdb) info b
No breakpoints or watchpoints.
(gdb) b mi_on_resume
Breakpoint 1 at 0x48cf46: file .././gdb/mi/mi-interp.c, line 335.
(gdb) b mi_execute_command
Breakpoint 2 at 0x505537: file .././gdb/mi/mi-main.c, line 1135.
(gdb) commands 1
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>print inferior_ptid
>c
>end
(gdb) commands 2
Type commands for when breakpoint 2 is hit, one per line.
End with a line saying just "end".
>c
>end
(gdb) ni
0x7c9507a8 in ntdll!KiIntSystemCall () from /c/WINDOWS/system32/ntdll.dll
(gdb)
0x7c9507bb in ntdll!KiIntSystemCall () from /c/WINDOWS/system32/ntdll.dll
(gdb)
0x7c9507bf in ntdll!KiIntSystemCall () from /c/WINDOWS/system32/ntdll.dll
(gdb)
0x7c9507c1 in ntdll!KiIntSystemCall () from /c/WINDOWS/system32/ntdll.dll
(gdb)
[Switching to thread 2348.0x740]
Breakpoint 2, mi_execute_command (cmd=0x138f74a0 "303 ni", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 1, mi_on_resume (ptid={pid = -1, lwp = 0, tid = 0})
at .././gdb/mi/mi-interp.c:335
335 if (PIDGET (ptid) == -1)
$1 = {pid = 42000, lwp = 0, tid = 0}
Breakpoint 2, mi_execute_command (cmd=0x1393df78 "304 info threads",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x1393dfd0 "305-stack-info-depth",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x1395a678 "306-stack-list-frames 0 1",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x1395a6d0 "307-data-list-changed-registers", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x13962898 "308 info sharedlibrary",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x139628f0 "309-stack-list-arguments 0 0 0", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x13927738 "310-stack-list-locals 0",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x13927790 "311-interpreter-exec console \"info b\"", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x13977ce8 "312 c", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 1, mi_on_resume (ptid={pid = -1, lwp = 0, tid = 0})
at .././gdb/mi/mi-interp.c:335
335 if (PIDGET (ptid) == -1)
$2 = {pid = 42000, lwp = 0, tid = 0}
Breakpoint 2, mi_execute_command (cmd=0x13974bd8 "313 info threads",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x13980e98 "314-stack-info-depth",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x14770128 "315-stack-list-frames 0 11", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x14770010 "316-data-list-changed-registers", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x10ef8958 "317 info sharedlibrary",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x10ef89b0 "318-data-disassemble -f /c/p4/views/KSW_S4000_WP_DEV_unknown
/qct/drivers/parb/parb.c -l 333 -n 100 -- 1", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x1476fe18 "319-data-disassemble -s 0x8c4a8e -e 0x8c4af2 -- 0",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x1172a8d0 "320-stack-list-arguments 0 0 0", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x11738a00 "321-stack-list-locals 0",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x1174b920 "322 whatis i", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x11758f10 "323 whatis rt_status",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x11761360 "324 whatis __result",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x11761548 "325-var-create - * i",
from_tty=1) at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x117616e8 "326-var-evaluate-expression var1", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x117c3978 "327-var-create - * rt_status", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x11785568 "328-var-evaluate-expression var2", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x1178b4b8 "329-var-create - * __result", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (
cmd=0x1178b550 "330-var-evaluate-expression var3", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 2, mi_execute_command (cmd=0x11795130 "331 ni", from_tty=1)
at .././gdb/mi/mi-main.c:1135
1135 {
Breakpoint 1, mi_on_resume (ptid={pid = 42000, lwp = 0, tid = 0})
at .././gdb/mi/mi-interp.c:335
335 if (PIDGET (ptid) == -1)
$3 = {pid = 42000, lwp = 0, tid = 0}
Program exited with code 037777777777.
(gdb)
next prev parent reply other threads:[~2008-06-26 13:56 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 17:03 Dmitry Smirnov
2008-06-24 17:29 ` Pedro Alves
2008-06-25 8:03 ` Dmitry Smirnov
2008-06-25 23:28 ` Pedro Alves
2008-06-26 13:56 ` Dmitry Smirnov [this message]
2008-06-26 14:21 ` Pedro Alves
2008-06-26 14:33 ` Dmitry Smirnov
2008-06-30 15:58 ` Dmitry Smirnov
2008-07-02 11:05 ` Dmitry Smirnov
2008-07-02 11:52 ` Pedro Alves
2008-07-02 12:51 ` Re[2]: " Dmitry Smirnov
2008-07-05 3:15 ` Pedro Alves
2008-07-07 8:36 ` Dmitry Smirnov
2008-07-07 14:29 ` Pedro Alves
2008-07-07 15:47 ` Dmitry Smirnov
2008-07-07 16:01 ` Pedro Alves
2008-07-08 8:27 ` Dmitry Smirnov
2008-07-01 11:38 ` Vladimir Prus
2008-07-01 11:41 ` Pedro Alves
-- strict thread matches above, loose matches on Subject: below --
2008-06-24 12:39 Dmitry Smirnov
2008-06-24 12:58 ` Pedro Alves
2008-06-24 8:52 Dmitry Smirnov
2008-06-23 16:32 Dmitry Smirnov
2008-06-23 16:57 ` Aleksandar Ristovski
2008-06-23 17:12 ` Michael Snyder
2008-06-23 18:23 ` Eli Zaretskii
2008-06-23 18:32 ` Michael Snyder
2008-06-23 18:36 ` Pedro Alves
2008-06-23 19:37 ` Brian Dessent
2008-06-23 20:50 ` Dr. Rolf Jansen
2008-06-23 20:59 ` Dr. Rolf Jansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KBrxa-000GAv-00.divis1969-mail-ru@f149.mail.ru \
--to=divis1969@mail.ru \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox