Hi,
Indeed, the documentation is outdated. It was somewhat working on
the old version of S2E (https://github.com/s2e/s2e-old), the new
one does not support that anymore.
Note that this method uses QEMU's guest debugging capabilities. It
debugs whatever code runs in the guest, which may or may not be
the program you want.
Instead, you could run gdb inside the guest. Modify bootstrap.sh
to call gdb with your program, then start S2E with:
$ GUI=1 ./launch-s2e.sh
./launch-s2e.sh debug is indeed made to debug S2E, it won't debug
the guest code.
Vitaly
--
--
You received this message because you are a member of the S2E Developer Forum.
To post to this group, send email to s2e...@googlegroups.com
To unsubscribe from this group, send email to s2e-dev+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/s2e-dev
---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/68d7987d-2808-43a0-b778-c59381940c6en%40googlegroups.com.
Hi,
Running gdb inside the guest is equivalent to the second point that I mentioned in my previous message. As you can see in the previous message, it ends up in a segfault. Do you have any idea on how I could fix this?
No, it's not. What I meant is to start gdb inside the guest, like
you would normally do when you debug a program. What the
documentation does instead is have QEMU expose through a network
port a GDB target to which a GDB instance running on the host can
connect. That's what the QEMU's -s switch is for. In this mode,
QEMU presents the entire guest address space to GDB. It's useful,
e.g., to debug the guest kernel. If you really want this mode, you
could have a look at this issue [1]. I think it's easier to just
write gdb --args "${TARGET}" "$@" around this line [2]. You will
need to write a GDB script to preload s2e.so before it starts the
target (see [3] for an example).
Vitaly
[1] https://github.com/S2E/s2e-env/issues/60
[2]
https://github.com/S2E/s2e-env/blob/master/s2e_env/templates/bootstrap.linux.sh#L24
[3]
https://github.com/S2E/s2e-env/blob/master/s2e_env/templates/launch-s2e.sh#L68
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/eb8ac955-ba54-4612-a175-bd666cacc4d7n%40googlegroups.com.
Hi,
You mean "terminating on signal 15 from pid 12114"? In this case,
it's normal behavior. There are no more states to run, so S2E
terminated itself (sigterm). The segfault you see is caused by a
guest program that may have crashed. The LinuxMonitor plugin
intercepts the segfault and terminates the state. You can disable
this behavior with this setting [1], e.g., if the segfault is
expected.
Vitaly
[1]
https://github.com/S2E/s2e-env/blob/master/s2e_env/templates/s2e-config.linux.lua#L13
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/1d3bc59d-fe31-4a04-963a-6b134dfcc250n%40googlegroups.com.