From: Michal Ludvig <mludvig@suse.cz>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: Strange segfaults of gdb
Date: Fri, 12 Apr 2002 04:27:00 -0000 [thread overview]
Message-ID: <3CB6C492.80108@suse.cz> (raw)
In-Reply-To: <9743-Fri12Apr2002120839+0300-eliz@is.elta.co.il>
Eli Zaretskii wrote:
>>It doesn't matter which program I run, what I want to print and if I
>>then want invoke 'run', 'continue' or even 'si'. It segfaults. Core file
>>doesn't give any reasonable informations.
>
> You mean, you cannot even tell from the core file where (inside what
> function) GDB crashes? That'd be very strange indeed--what could
> prevent you from getting att his information? Is the core file
> corrupt or something?
I can see the same information as if I run gdb from gdb. Anyway I treat
them incorrect [see below].
> What if you run GDB under another GDB--can you see where does the
> subordinate GDB crash then?
(gdb) p 1
$1 = 1
(gdb) r
Starting program: /root/mludvig/tst/xmmtest
Program received signal SIGSEGV, Segmentation fault.
0x2a95ae759c in wait4 () at soinit.c:76
76 }
(top-gdb) disassemble 0x2a95ae759c
Dump of assembler code for function wait4:
0x2a95ae7590 <wait4>: mov %rcx,%r10
0x2a95ae7593 <wait4+3>: mov $0x3d,%rax
0x2a95ae759a <wait4+10>: syscall
0x2a95ae759c <wait4+12>: cmp $0xfffffffffffff001,%rax
0x2a95ae75a2 <wait4+18>: jae 0x2a95ae75a5 <wait4+21>
0x2a95ae75a4 <wait4+20>: retq
0x2a95ae75a5 <wait4+21>: xor %rdx,%rdx
0x2a95ae75a8 <wait4+24>: sub %rax,%rdx
0x2a95ae75ab <wait4+27>: push %rdx
0x2a95ae75ac <wait4+28>: callq 0x2a95a6fa30 <key+145504>
0x2a95ae75b1 <wait4+33>: pop %rdx
0x2a95ae75b2 <wait4+34>: mov %rdx,(%rax)
0x2a95ae75b5 <wait4+37>: or $0xffffffffffffffff,%rax
0x2a95ae75b9 <wait4+41>: jmp 0x2a95ae75a4 <wait4+20>
0x2a95ae75bb <wait4+43>: nop
0x2a95ae75bc <wait4+44>: nop
0x2a95ae75bd <wait4+45>: nop
0x2a95ae75be <wait4+46>: nop
0x2a95ae75bf <wait4+47>: nop
End of assembler dump.
So it appears like the segfault happend on 'cmp <imm>,<reg>'
instruction, which shouldn't be able to generate any exception at all.
So I don't trust this information.
Or do you have an idea how to interpret it? I don't say it's a bug in
the gdb - it may be in the kernel, glibc or gcc as well, but everything
else seems to work. Only gdb doesn't...
May this be a memory corruption problem on the gdb side (perhaps it
passes a wrong address to the syscall)? I'll try to use ElectricFence to
see what happens.
Is there somewhere a tutorial on how to examine/compare core files
generated by gcore command? What should I look for?
It's somehow difficult to debug a broken debugger using a broken
debugger :-((
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
next prev parent reply other threads:[~2002-04-12 11:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-11 9:12 Michal Ludvig
2002-04-11 14:43 ` Michael Snyder
2002-04-12 2:13 ` Eli Zaretskii
2002-04-12 4:27 ` Michal Ludvig [this message]
2002-04-12 5:05 ` Eli Zaretskii
2002-04-16 11:16 ` Michael Snyder
2002-04-17 3:12 ` Michal Ludvig
2002-12-12 16:36 Terje Eggestad
2002-12-13 9:59 ` Michal Ludvig
[not found] ` <1039817373.10496.19.camel@eggis1>
2002-12-14 6:09 ` Michal Ludvig
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=3CB6C492.80108@suse.cz \
--to=mludvig@suse.cz \
--cc=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
/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