Access to remote target via python in GDB

Duane Ellis <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.