* How can I implement new breakpoint commands @ 2020-11-12 9:36 Nagmat Nazar 2020-11-13 15:43 ` Simon Marchi 0 siblings, 1 reply; 3+ messages in thread From: Nagmat Nazar @ 2020-11-12 9:36 UTC (permalink / raw) To: gdb I would like to add 3 more commands to GDB, *set, unset, list PCB *commands and would like to break if I have the same value with the *program context register(special register implemented by me). *How can I implement these commands? Where can I start from? Kind regards, Nagmat ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How can I implement new breakpoint commands 2020-11-12 9:36 How can I implement new breakpoint commands Nagmat Nazar @ 2020-11-13 15:43 ` Simon Marchi [not found] ` <CAJnvuZ_OeG3J+KJ4Nq67cg7DoO9gNQDQXv6-QDSycvKi_ammrg@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Simon Marchi @ 2020-11-13 15:43 UTC (permalink / raw) To: Nagmat Nazar, gdb On 2020-11-12 4:36 a.m., Nagmat Nazar via Gdb wrote: > I would like to add 3 more commands to GDB, *set, unset, list PCB *commands > and would like to break if I have the same value with the *program context > register(special register implemented by me). *How can I implement these > commands? Where can I start from? > > Kind regards, > Nagmat > Hi Nagmat, Maybe I don't understand your goal correctly, but it sounds like you could use breakpoints conditions? Simon ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAJnvuZ_OeG3J+KJ4Nq67cg7DoO9gNQDQXv6-QDSycvKi_ammrg@mail.gmail.com>]
* Re: How can I implement new breakpoint commands [not found] ` <CAJnvuZ_OeG3J+KJ4Nq67cg7DoO9gNQDQXv6-QDSycvKi_ammrg@mail.gmail.com> @ 2020-11-15 18:05 ` Simon Marchi 0 siblings, 0 replies; 3+ messages in thread From: Simon Marchi @ 2020-11-15 18:05 UTC (permalink / raw) To: Nagmat Nazar, gdb 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-15 18:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-12 9:36 How can I implement new breakpoint commands Nagmat Nazar 2020-11-13 15:43 ` Simon Marchi [not found] ` <CAJnvuZ_OeG3J+KJ4Nq67cg7DoO9gNQDQXv6-QDSycvKi_ammrg@mail.gmail.com> 2020-11-15 18:05 ` Simon Marchi
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).