This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Access to remote target via python in GDB
- From: Duane Ellis <duane at duaneellis dot com>
- To: gdb at sourceware dot org
- Date: Fri, 12 Jun 2015 07:31:19 -0700
- Subject: Access to remote target via python in GDB
- Authentication-results: sourceware.org; auth=none
Hi,
I need to send some raw (custom) GDB/REMOTE packets to my target.
My end goal is this:
a) I need to create some extra GDB commands
I want to write them in Python.
b) My target = remote always
c) My new commands need to send new packets to my remote target
And of course handle the reply
What I understand so far:
I see the "packet" command is available when target=remote, I can use this to send a command.
I don't see a basic interface to this from Python, it seems the only means to do this is via the "gdb.execute" python method.
My question is this: Am I missing something? Or am on the right track. I don't want to travel down "the stupid road" only to learn there was a better way.]
Is my understanding correct? Is there a better way?
Thanks.