How can I implement new breakpoint commands

Simon Marchi simark@simark.ca
Sun Nov 15 18:05:44 GMT 2020


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


More information about the Gdb mailing list