Lines Matching refs:gdb
4 Run gdb to disassemble a function, feed the bytes to 'llvm-mc -disassemble' command,
34 gdb_prompt = "\r\n\(gdb\) "
35 gdb = pexpect.spawn(('gdb %s' % gdb_options) if gdb_options else 'gdb')
36 # Turn on logging for what gdb sends back.
37 gdb.logfile_read = sys.stdout
38 gdb.expect(gdb_prompt)
42 gdb.sendline(cmd)
43 gdb.expect(gdb_prompt)
46 gdb.sendline('file %s' % exe)
47 gdb.expect(gdb_prompt)
50 gdb.sendline('disassemble %s' % func)
51 gdb.expect(gdb_prompt)
53 # Get the output from gdb.
54 gdb_output = gdb.before
56 # Use StringIO to record the memory dump as well as the gdb assembler code.
89 # Feed the examining memory command to gdb.
90 gdb.sendline('x /%db %s' % (addr_diff, prev_addr))
91 gdb.expect(gdb_prompt)
92 x_output = gdb.before
93 # Get the last output line from the gdb examine memory command,
104 # Close the gdb session now that we are done with it.
105 gdb.sendline('quit')
106 gdb.expect(pexpect.EOF)
107 gdb.close()
131 Run gdb to disassemble a function, feed the bytes to 'llvm-mc -disassemble' command,
136 parser.add_option('-C', '--gdb-command',
139 help='Command(s) gdb executes after starting up (can be empty)')
140 parser.add_option('-O', '--gdb-options',
143 help="""The options passed to 'gdb' command if specified.""")
151 help="""The function name (could be an address to gdb) for disassembly.""")
188 print "gdb commands:", gdb_commands
189 print "gdb options:", gdb_options