From: Arpan <arpananand@gmail.com>
To: gdb@sourceware.org
Subject: gdb command argument related question
Date: Wed, 10 May 2023 16:20:16 +0530 [thread overview]
Message-ID: <CANRJEdngxDkd-=V15QqLsqGfvGvuqpwz3GGGueGfFx1X3LZiFQ@mail.gmail.com> (raw)
[-- 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
reply other threads:[~2023-05-10 10:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANRJEdngxDkd-=V15QqLsqGfvGvuqpwz3GGGueGfFx1X3LZiFQ@mail.gmail.com' \
--to=arpananand@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).