170 likes | 192 Views
Explore the latest updates in Dyninst 5.1, including AMD64 support, threaded event handling, a new fine-grained instrumentation system, Intel and Portland compiler support on AMD64, bug fixes, performance optimizations, SymtabAPI, testsuite improvements, and more.
E N D
New Features in Dyninst 5.1 Matthew LeGendre Ray Chen
A Busy Year • July 6, 2006 – Dyninst 5.0 • AMD64 Support • Threaded Event Handling • New fine-grained instrumentation system . . . • Sep 22, 2006 – Dyninst 5.0.1 • Intel and Portland compiler support on AMD64 • Bug Fixes • May 2007 – Dyninst 5.1
Paradyn/Dyninst 5.1 • Dyninst 5.1 • SymtabAPI • Testsuite • Performance Optimizations • Catch-up • Paradyn 5.1 • Paradyn as a Dyninst Client
The SymtabAPI • A library for parsing symbol information in binaries. • You don’t need to understand binary formats • Cross-platform: ELF, COFF, XCOFF, PE • Allows updating of binaries, write-back for ELF and XCOFF • XML Export • The first part in the DyninstAPI split
The Testsuite • Splits Dyninst’s monolithic tests with micro-tests. • Better test coverage and easier to use • Runs a cross product of tests, compilers, mutatees, and dyninst run modes % ./runTests test1_1: mutatee: test1.mutatee_gcc create_mode: create result: PASSED test1_1: mutatee: test1.mutatee_gcc create_mode: attach result: PASSED test1_1: mutatee: test1.mutatee_g++ create_mode: create result: PASSED test1_1: mutatee: test1.mutatee_g++ create_mode: attach result: PASSED test1_1: mutatee: test1.mutatee_g77 create_mode: create result: PASSED test1_1: mutatee: test1.mutatee_g77 create_mode: attach result: PASSED
Performance Optimizations • Generate efficient instrumentation • Turn of instrumentation components you don’t need. mov 0x8049630,%eax mov %eax,0xfffffffc(%ebp) addl $0x1,0xfffffffc(%ebp) mov 0xfffffffc(%ebp),%eax incl 0x8049630
Start Timer You Are Here Stop Timer Catch-Up • Use finalizeInsertionSetWithCatchup to insert instrumentation with Catch-up int foo() { printf(“doing work”); do_work(); return 0; }
Paradyn/Dyninst Split • Paradyn is now a proper client of Dyninst. Paradyn Dyninst
Many, Many Other Features • DWARF support on Solaris • New Dyninst manual • Shared memory library as a value added library • Memory Modification • New machine support • Bug fixes
Undocumented Feature • Debugging Dyninst • Ever had a problem with Dyninst? • Can’t use Dyninst on Dyninst • Limited support for C++ • 19 Environment Variables • Dyninst checks for these at start • Strategic printf()’s at milestones in code • Output to stderr
Debugging Environment Variables • Startup • DYNINST_DEBUG_STARTUP • DYNINST_DEBUG_PARSE • DYNINST_DEBUG_DWARF • Process Control • DYNINST_DEBUG_PROCCONTROL • DYNINST_DEBUG_FORKEXEC
Debugging Environment Variables • Dyninst Internal Threads • DYNINST_DEBUG_THREAD • DYNINST_DEBUG_MUTEX • DYNINST_DEBUG_MAILBOX • Mutatee Handling • DYNINST_DEBUG_INFRPC • DYNINST_DEBUG_STACKWALK • DYNINST_DEBUG_DYN_UNW • DYNINST_DEBUG_WRITE
Debugging Environment Variables • Instrumentation • DYNINST_DEBUG_INST • DYNINST_DEBUG_RELOC • DYNINST_DEBUG_AST • DYNINST_DEBUG_REGALLOC • DYNINST_DEBUG_CATCHUP • Miscellaneous • DYNINST_DEBUG_DBI • DYNINST_DEBUG_BPATCH
Example Use > > ./parseThat /bin/ls * Dyninst mutator terminated via signal 11. * Core file generated.
Example Use > setenv DYNINST_DEBUG_STARTUP > ./parseThat /bin/ls <…snip…> [UI]process.C[2461]: Waiting for bootstrapped state... [UI]process.C[2632]: state: bootstrapped Getting initial thread... Creating new BPatch_image... BPatch_process::BPatch_process, completed. * Dyninst mutator terminated via signal 11. * Core file generated.
Example Use > setenv DYNINST_DEBUG_BPATCH > ./parseThat /bin/ls <…snip…> [UI]: Calling char * getNameInt()... [UI]: Finished call getNameInt [UI]: Calling getProceduresInt()... [UI]: Finished call getProceduresInt [UI]: Calling char * getNameBuffer()... [UI]: Finished call getNameBuffer [UI]: Calling void BPatch_arithExprUn() * Dyninst mutator terminated via signal 11. * Core file generated.
Output • Don’t expect to understand output • Intended for DyninstAPI developer or advanced user • Expect us to request output from you • Makes remote debugging sessions easier