hello all,
I have one question.
i built qemu-system-arm and i want to debug using gdb inside qemu.
but i don't know how can i load qemu symbol which address in 64bit.
for example,
$>gdb --args qemu-system-arm xxx
in gdb,
(gdb) add-symbol-file qemu-system-arm (?)
the additional information is as below.
$> file qemu-system-arm
qemu-system-arm: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x542de177694d78c4f062456d3e9f28cc5da1f03a, not stripped
$> readelf -a qemu-system-arm
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x7ad90
Start of program headers: 64 (bytes into file)
Start of section headers: 12742552 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 41
Section header string table index: 38
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 0000000000000270 00000270
000000000000001c 0000000000000000 A 0 0 1
[ 2] .note.ABI-tag NOTE 000000000000028c 0000028c
0000000000000020 0000000000000000 A 0 0 4
[ 3] .note.gnu.build-i NOTE 00000000000002ac 000002ac
0000000000000024 0000000000000000 A 0 0 4
[ 4] .gnu.hash GNU_HASH 00000000000002d0 000002d0
0000000000001420 0000000000000000 A 5 0 8
[ 5] .dynsym DYNSYM 00000000000016f0 000016f0
0000000000006180 0000000000000018 A 6 3 8
[ 6] .dynstr STRTAB 0000000000007870 00007870
0000000000003ff6 0000000000000000 A 0 0 1
[ 7] .gnu.version VERSYM 000000000000b866 0000b866
0000000000000820 0000000000000002 A 5 0 2
[ 8] .gnu.version_r VERNEED 000000000000c088 0000c088
0000000000000150 0000000000000000 A 6 6 8
[ 9] .rela.dyn RELA 000000000000c1d8 0000c1d8
000000000006ae78 0000000000000018 A 5 0 8
[10] .rela.plt RELA 0000000000077050 00077050
00000000000024a8 0000000000000018 A 5 12 8
[11] .init PROGBITS 00000000000794f8 000794f8
0000000000000018 0000000000000000 AX 0 0 4
[12] .plt PROGBITS 0000000000079510 00079510
0000000000001880 0000000000000010 AX 0 0 16
[13] .text PROGBITS 000000000007ad90 0007ad90
000000000036ae18 0000000000000000 AX 0 0 16
[14] .fini PROGBITS 00000000003e5ba8 003e5ba8
000000000000000e 0000000000000000 AX 0 0 4
[15] .rodata PROGBITS 00000000003e5bc0 003e5bc0
0000000000077ff7 0000000000000000 A 0 0 32
[16] .eh_frame_hdr PROGBITS 000000000045dbb8 0045dbb8
000000000001a51c 0000000000000000 A 0 0 4
[17] .eh_frame PROGBITS 00000000004780d8 004780d8
00000000000695e4 0000000000000000 A 0 0 8
[18] .tbss NOBITS 00000000006e1e88 004e1e88
0000000000000008 0000000000000000 WAT 0 0 8
[19] .init_array INIT_ARRAY 00000000006e1e88 004e1e88
00000000000005f0 0000000000000000 WA 0 0 8
[20] .fini_array FINI_ARRAY 00000000006e2478 004e2478
0000000000000008 0000000000000000 WA 0 0 8
[21] .ctors PROGBITS 00000000006e2480 004e2480
0000000000000010 0000000000000000 WA 0 0 8
[22] .dtors PROGBITS 00000000006e2490 004e2490
0000000000000010 0000000000000000 WA 0 0 8
If you know answer, please let me know.