[panda-users] Debugging Suggestion

Giovanni Mascellani g.mascellani at gmail.com
Fri Mar 2 03:37:15 EST 2018


Il 02/03/2018 00:02, Brendan Dolan-Gavitt ha scritto:
> You can run PANDA under gdb to debug plugin code. It will be easier if
> you compile with the -O0 -g flags set in CFLAGS. In PANDA 2.0 you can
> just pass the --enable-debug argument to build.sh, whereas for PANDA 1.0
> I believe you need to actually edit the build script. 

A debugging tip for QEMU I once saw somewhere over the Internet is to
enable the gcc flag -save-temps. This makes gcc preserving the temporary
files it generates, particularly the source after preprocessing. Since
qemu makes heavy use of macros, often in a not very self documenting
way, inspecting the preprocessed file can help a lot. Although this is
particularly true if you are reading the main qemu code. Maybe for PANDA
plugins this is less relevant, but still I was enlightened when I
discovered about it.

Cheers, Giovanni.
-- 
Giovanni Mascellani <g.mascellani at gmail.com>
Postdoc researcher - Université Libre de Bruxelles

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://mailman.mit.edu/pipermail/panda-users/attachments/20180302/13885907/attachment.bin


More information about the panda-users mailing list