* x86_64 gdb and objdump
@ 2007-07-02 19:14 Srinivas Murthy
2007-07-02 19:23 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Murthy @ 2007-07-02 19:14 UTC (permalink / raw)
To: gdb
From a core dump file, I see that with gdb I get a "Cannot access
memory at address xx" msg but using objdump, I can see the contents of
the memory location on the core file.
Any ideas what is going wrong?
Thanks.
# gdb test core_dir/core.test.30235
GNU gdb 6.6
Copyright (C) 2006 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 "x86_64-unknown-linux-gnu"...
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./test'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004004f5 in bar () at test.c:10
10 test.c: No such file or directory.
in test.c
(gdb) bt
#0 0x00000000004004f5 in bar () at test.c:10
Cannot access memory at address 0x7fbfffee98
However, objdump shows that there is some valid content at the location:
# objdump -D /tmp/core.test.30235 |less |grep 7fbfffee98
7fbfffe95f: 00 08 add %cl,(%rax)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: x86_64 gdb and objdump
2007-07-02 19:14 x86_64 gdb and objdump Srinivas Murthy
@ 2007-07-02 19:23 ` Daniel Jacobowitz
2007-07-02 20:39 ` Srinivas Murthy
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-07-02 19:23 UTC (permalink / raw)
To: Srinivas Murthy; +Cc: gdb
On Mon, Jul 02, 2007 at 12:14:43PM -0700, Srinivas Murthy wrote:
> #0 0x00000000004004f5 in bar () at test.c:10
> 10 test.c: No such file or directory.
> in test.c
> (gdb) bt
> #0 0x00000000004004f5 in bar () at test.c:10
> Cannot access memory at address 0x7fbfffee98
Does x/x 0x7fbfffee98 work?
> However, objdump shows that there is some valid content at the location:
>
> # objdump -D /tmp/core.test.30235 |less |grep 7fbfffee98
> 7fbfffe95f: 00 08 add %cl,(%rax)
That's not the same address...
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x86_64 gdb and objdump
2007-07-02 19:23 ` Daniel Jacobowitz
@ 2007-07-02 20:39 ` Srinivas Murthy
2007-07-02 21:03 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Murthy @ 2007-07-02 20:39 UTC (permalink / raw)
To: gdb
I did try "x ..." at a bunch of memory locations and it outputs the
same error msg.
It seems like its not able to access any memory location in the core file.
Thanks.
On 7/2/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Mon, Jul 02, 2007 at 12:14:43PM -0700, Srinivas Murthy wrote:
> > #0 0x00000000004004f5 in bar () at test.c:10
> > 10 test.c: No such file or directory.
> > in test.c
> > (gdb) bt
> > #0 0x00000000004004f5 in bar () at test.c:10
> > Cannot access memory at address 0x7fbfffee98
>
> Does x/x 0x7fbfffee98 work?
>
> > However, objdump shows that there is some valid content at the location:
> >
> > # objdump -D /tmp/core.test.30235 |less |grep 7fbfffee98
> > 7fbfffe95f: 00 08 add %cl,(%rax)
>
> That's not the same address...
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x86_64 gdb and objdump
2007-07-02 20:39 ` Srinivas Murthy
@ 2007-07-02 21:03 ` Daniel Jacobowitz
2007-07-02 23:17 ` Srinivas Murthy
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-07-02 21:03 UTC (permalink / raw)
To: Srinivas Murthy; +Cc: gdb
On Mon, Jul 02, 2007 at 01:39:05PM -0700, Srinivas Murthy wrote:
> I did try "x ..." at a bunch of memory locations and it outputs the
> same error msg.
>
> It seems like its not able to access any memory location in the core file.
This works fine for me. Can you provide a test case?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x86_64 gdb and objdump
2007-07-02 21:03 ` Daniel Jacobowitz
@ 2007-07-02 23:17 ` Srinivas Murthy
0 siblings, 0 replies; 5+ messages in thread
From: Srinivas Murthy @ 2007-07-02 23:17 UTC (permalink / raw)
To: gdb
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
I've attached the core dump, the executable and the source is listed below:
void bar() {
char *p = 0;
printf("%s %d \n", __FUNCTION__, __LINE__);
*p = 0;
return;
}
void foo() {
printf("%s %d \n", __FUNCTION__, __LINE__);
bar();
return;
}
int main() {
foo();
return 0;
}
On 7/2/07, Daniel Jacobowitz <drow@false.org> wrote:
On Mon, Jul 02, 2007 at 01:39:05PM -0700, Srinivas Murthy wrote:
> I did try "x ..." at a bunch of memory locations and it outputs the
> same error msg.
>
> It seems like its not able to access any memory location in the core file.
This works fine for me. Can you provide a test case?
--
Daniel Jacobowitz
CodeSourcery
Attachment:
core.temp
Description: Binary data
Attachment:
temp
Description: Binary data
[-- Attachment #2: temp --]
[-- Type: application/x-executable, Size: 10109 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-02 23:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-02 19:14 x86_64 gdb and objdump Srinivas Murthy
2007-07-02 19:23 ` Daniel Jacobowitz
2007-07-02 20:39 ` Srinivas Murthy
2007-07-02 21:03 ` Daniel Jacobowitz
2007-07-02 23:17 ` Srinivas Murthy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox