public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb command argument related question
@ 2023-05-10 10:50 Arpan
  0 siblings, 0 replies; only message in thread
From: Arpan @ 2023-05-10 10:50 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

Hi,

I am a new user of GDB. after some understanding from google, i could write
my gdb commands in a python file by name "myFile.py" and use it as below:

main.py:
subprocess.Popen(["arm-none-eabi-gdb-py.exe", "--command=main3.py"])

myFile.py:
import gdb
import sys
import os
print("gdb loading executable")
gdb.execute('some executable file')
gdb.Breakpoint('some function_name')
gdb.execute("c")
etc

my question is, how do i pass some arguments to myFile.py from main.py? is
it even possible? If yes, then please share some examples for the same.

one more question is, if I have some methods defined in myFile.py, can I
access them in main.py? If so, how?

Any help on these queries would be really appreciated.


Thanks & Regards,
Arpan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-10 10:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 10:50 gdb command argument related question Arpan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).