Re: How can I implement new breakpoint commands

Simon Marchi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 2020-11-14 10:25 p.m., Nagmat Nazar wrote:
> Dear Simon Marchi,
>
> Yeah I can handle that using breakpoint conditions for now, but I would like to improve it for my research. So, How can I add new commands on GDB? In which file shall I start coding?
>
> Kind regards,
> Nagmat

Hi Nagmat,

Please keep the list in CC when participating in a discussion on a
mailing list.

The commands are added in the _initialize_* functions in various files.
For example, here's where the "break" command is created:

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/breakpoint.c;h=23278320d9d465943bf94ec2c35a5a1438c45f2a;hb=b74dbc2093191b10f4963f43ee570b54c9593404#l15802

Simon
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.