gdb command argument related question

Arpan via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CANRJEdngxDkd-=V15QqLsqGfvGvuqpwz3GGGueGfFx1X3LZiFQ@mail.gmail.com>
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
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.