Opened 12 years ago
Closed 12 years ago
#452 closed defect (fixed)
amd64 cores do not contain valid register information
Reported by: | Jakub Jermář | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.5.0 |
Component: | helenos/app/taskdump | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
While working on #396, taskdump
generated a coredump for which gdb reports:
jermar@gorgo:~/lab$ gdb tester 51.core GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02 Copyright (C) 2012 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-linux-gnu". For bug reporting instructions, please see: <http://bugs.launchpad.net/gdb-linaro/>... Reading symbols from /home/jermar/lab/tester...(no debugging symbols found)...done. Illegal process-id: 51.core. warning: exec file is newer than core file. warning: Couldn't find general-purpose registers in core file. warning: Couldn't find general-purpose registers in core file. #0 <unavailable> in ?? ()
The coredump and the binary are attached.
Attachments (2)
Change History (8)
by , 12 years ago
Attachment: | 51.core.bz2 added |
---|
comment:1 by , 12 years ago
Note, you are using your system's native GDB x86_64-linux-gnu. Did you try using the proper cross GDB, which has target triplet amd64-linux-gnu?
comment:2 by , 12 years ago
I did, the result is pretty much the same with some slight difference in the warnings printed:
jermar@hexatonsil:~/Downloads$ /usr/local/cross/amd64/bin/amd64-linux-gnu-gdb tester 51.core GNU gdb (GDB) 7.4 Copyright (C) 2012 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 "--host=x86_64-unknown-linux-gnu --target=amd64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/jermar/Downloads/tester...(no debugging symbols found)...done. Don't know how to attach. Try "help target". warning: exec file is newer than core file. warning: Couldn't find general-purpose registers in core file. warning: Couldn't find general-purpose registers in core file. #0 <unavailable> in ?? ()
comment:3 by , 12 years ago
I was able to reproduce this with both current GDB and GDB 6.7a, so it was not broken by changing GDB version. We should try using old HelenOS revision. I am pretty sure I tested this and no idea so far what could have broken it.
comment:5 by , 12 years ago
The ability to write amd64 register state was added in mainline,1131. I did some testing:
- mainline,1496 on ia32, GDB 7.2 .. OK
- mainline,1496 on amd64, GDB 7.2 .. broken
- mainline,1131 on amd64, GDB 7.2 .. broken
That's strange, looks like it never worked?
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The problem is that the resepctive elf_regs_t structure was missing the following:
uint64_t unused_fs_base; uint64_t unused_gs_base; uint64_t unused_ds; uint64_t unused_es; uint64_t unused_fs; uint64_t unused_gs;
Without these, the prstatus structure seemed too short to GDB and was IMO simply ignored as invalid.
Fixed in mainline,1585.
coredump of the tester task