lldbinit icon indicating copy to clipboard operation
lldbinit copied to clipboard

breakpoint at line number?

Open wchmb opened this issue 11 months ago • 2 comments

Hi @gdbinit, thank you for your efforts

Before I found lldbinit, I used to set breakpoints at line numbers like b <filename> :<line-number>

I want to use lldbinit, but I'm unable to set my breaks because the default alias replacement: ci.HandleCommand("command unalias b", res)

How can I do that? I'm sure others will benefit from my newbie question

wchmb avatar Feb 13 '25 09:02 wchmb

You will need to remove the alias or replace with something else so you can use the original alias if you really want the 'b' shortcut.

Otherwise you can use the full command (help break set) and specify the file and line numbers via arguments since 'b' is itself an alias in default lldb.

Or you can improve the lldbinit command associated to the new 'b' alias and support the line breakpoints.

Probably just easier to use the full command for those specific situations. lldbinit is 99,9% built towards binary only debugging so source based support is not very interesting to me.

gdbinit avatar Feb 22 '25 02:02 gdbinit

Thanks. I find lldbinit interesing alongside the code.

If I've enough time to support line breaks, you'd accept PR? or would it be better to fork?

wchmb avatar Mar 05 '25 15:03 wchmb