* [Qemu-devel] [Bug 1528239] [NEW] Unable to debug PIE binaries with QEMU gdb stub.
@ 2015-12-21 14:29 Maxim Ostapenko
2015-12-22 8:18 ` [Qemu-devel] [Bug 1528239] " Maxim Ostapenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Maxim Ostapenko @ 2015-12-21 14:29 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
The issue occurs on current trunk:
max@max:~/build/qemu$ cat test.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
max@max:~/build/qemu$ gcc test.c -fPIC -pie -o bad.x
max@max:~/build/qemu$ ./x86_64-linux-user/qemu-x86_64 -g 1234 bad.x
.............................
max@max:~/build/qemu$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
........................................................................................
(gdb) file bad.x
Reading symbols from bad.x...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x779
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Reading symbols from /lib64/ld-linux-x86-64.so.2...warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
0x0000004000a042d0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Continuing.
[Inferior 1 (Remote target) exited normally]
(gdb)
max@max:~/build/qemu$ cat config.log
# Configured with: '/home/max/src/qemu/configure' '--prefix=/home/max/install/qemu' '--target-list=arm-linux-user,aarch64-linux-user,x86_64-linux-user' '--static'
W/O QEMU or -pie flag breakpoint on main works fine.
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1528239
Title:
Unable to debug PIE binaries with QEMU gdb stub.
Status in QEMU:
New
Bug description:
The issue occurs on current trunk:
max@max:~/build/qemu$ cat test.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
max@max:~/build/qemu$ gcc test.c -fPIC -pie -o bad.x
max@max:~/build/qemu$ ./x86_64-linux-user/qemu-x86_64 -g 1234 bad.x
.............................
max@max:~/build/qemu$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
........................................................................................
(gdb) file bad.x
Reading symbols from bad.x...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x779
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Reading symbols from /lib64/ld-linux-x86-64.so.2...warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
0x0000004000a042d0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Continuing.
[Inferior 1 (Remote target) exited normally]
(gdb)
max@max:~/build/qemu$ cat config.log
# Configured with: '/home/max/src/qemu/configure' '--prefix=/home/max/install/qemu' '--target-list=arm-linux-user,aarch64-linux-user,x86_64-linux-user' '--static'
W/O QEMU or -pie flag breakpoint on main works fine.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1528239/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [Bug 1528239] Re: Unable to debug PIE binaries with QEMU gdb stub.
2015-12-21 14:29 [Qemu-devel] [Bug 1528239] [NEW] Unable to debug PIE binaries with QEMU gdb stub Maxim Ostapenko
@ 2015-12-22 8:18 ` Maxim Ostapenko
2019-09-05 7:19 ` Lukas Durfina
2020-01-09 16:34 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Maxim Ostapenko @ 2015-12-22 8:18 UTC (permalink / raw)
To: qemu-devel
GDB server itself actually supports PIE binaries.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1528239
Title:
Unable to debug PIE binaries with QEMU gdb stub.
Status in QEMU:
New
Bug description:
The issue occurs on current trunk:
max@max:~/build/qemu$ cat test.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
max@max:~/build/qemu$ gcc test.c -fPIC -pie -o bad.x
max@max:~/build/qemu$ ./x86_64-linux-user/qemu-x86_64 -g 1234 bad.x
.............................
max@max:~/build/qemu$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
........................................................................................
(gdb) file bad.x
Reading symbols from bad.x...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x779
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Reading symbols from /lib64/ld-linux-x86-64.so.2...warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
0x0000004000a042d0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Continuing.
[Inferior 1 (Remote target) exited normally]
(gdb)
max@max:~/build/qemu$ cat config.log
# Configured with: '/home/max/src/qemu/configure' '--prefix=/home/max/install/qemu' '--target-list=arm-linux-user,aarch64-linux-user,x86_64-linux-user' '--static'
W/O QEMU or -pie flag breakpoint on main works fine.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1528239/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [Bug 1528239] Re: Unable to debug PIE binaries with QEMU gdb stub.
2015-12-21 14:29 [Qemu-devel] [Bug 1528239] [NEW] Unable to debug PIE binaries with QEMU gdb stub Maxim Ostapenko
2015-12-22 8:18 ` [Qemu-devel] [Bug 1528239] " Maxim Ostapenko
@ 2019-09-05 7:19 ` Lukas Durfina
2020-01-09 16:34 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Lukas Durfina @ 2019-09-05 7:19 UTC (permalink / raw)
To: qemu-devel
This patch
https://patchew.org/QEMU/20190816233422.16715-1-jkz@google.com/ fixes
the issue.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1528239
Title:
Unable to debug PIE binaries with QEMU gdb stub.
Status in QEMU:
New
Bug description:
The issue occurs on current trunk:
max@max:~/build/qemu$ cat test.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
max@max:~/build/qemu$ gcc test.c -fPIC -pie -o bad.x
max@max:~/build/qemu$ ./x86_64-linux-user/qemu-x86_64 -g 1234 bad.x
.............................
max@max:~/build/qemu$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
........................................................................................
(gdb) file bad.x
Reading symbols from bad.x...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x779
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Reading symbols from /lib64/ld-linux-x86-64.so.2...warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
0x0000004000a042d0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Continuing.
[Inferior 1 (Remote target) exited normally]
(gdb)
max@max:~/build/qemu$ cat config.log
# Configured with: '/home/max/src/qemu/configure' '--prefix=/home/max/install/qemu' '--target-list=arm-linux-user,aarch64-linux-user,x86_64-linux-user' '--static'
W/O QEMU or -pie flag breakpoint on main works fine.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1528239/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1528239] Re: Unable to debug PIE binaries with QEMU gdb stub.
2015-12-21 14:29 [Qemu-devel] [Bug 1528239] [NEW] Unable to debug PIE binaries with QEMU gdb stub Maxim Ostapenko
2015-12-22 8:18 ` [Qemu-devel] [Bug 1528239] " Maxim Ostapenko
2019-09-05 7:19 ` Lukas Durfina
@ 2020-01-09 16:34 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2020-01-09 16:34 UTC (permalink / raw)
To: qemu-devel
Patch has been included in QEMU v4.2:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=dc12567a53c88d7a91b9
** Changed in: qemu
Status: New => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1528239
Title:
Unable to debug PIE binaries with QEMU gdb stub.
Status in QEMU:
Fix Released
Bug description:
The issue occurs on current trunk:
max@max:~/build/qemu$ cat test.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
max@max:~/build/qemu$ gcc test.c -fPIC -pie -o bad.x
max@max:~/build/qemu$ ./x86_64-linux-user/qemu-x86_64 -g 1234 bad.x
.............................
max@max:~/build/qemu$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
........................................................................................
(gdb) file bad.x
Reading symbols from bad.x...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x779
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Reading symbols from /lib64/ld-linux-x86-64.so.2...warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
Error in re-setting breakpoint 1: Cannot access memory at address 0x775
0x0000004000a042d0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Continuing.
[Inferior 1 (Remote target) exited normally]
(gdb)
max@max:~/build/qemu$ cat config.log
# Configured with: '/home/max/src/qemu/configure' '--prefix=/home/max/install/qemu' '--target-list=arm-linux-user,aarch64-linux-user,x86_64-linux-user' '--static'
W/O QEMU or -pie flag breakpoint on main works fine.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1528239/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-09 16:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-21 14:29 [Qemu-devel] [Bug 1528239] [NEW] Unable to debug PIE binaries with QEMU gdb stub Maxim Ostapenko
2015-12-22 8:18 ` [Qemu-devel] [Bug 1528239] " Maxim Ostapenko
2019-09-05 7:19 ` Lukas Durfina
2020-01-09 16:34 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).