Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLDB Break at Address

I apologize for the likely trivial question but I am running into a wall as Google gives me the same non-applicable answers over and over.

I am trying to set a breakpoint in LLDB. After reading the documentation, the options available to me are to either stop on a certain line in the source or on a certain symbol.

What I want to do is set a breakpoint on a certain memory location.

Not read-or-write to that memory location either but simply breaking when the instruction at that location is about to be executed.

In Pseudocode:

break 0x00010000

breaks when EIP points to 0x00010000.

How can I do this?

like image 735
0x90 Avatar asked Nov 22 '12 05:11

0x90


People also ask

How do you set a breakpoint in LLDB?

In lldb you can set breakpoints by typing either break or b followed by information on where you want the program to pause. After the b command, you can put either: a function name (e.g., b my_subroutine ) a line number (e.g., b 12 )

How do I stop LLDB?

Type quit to exit the lldb session.

What is LLDB in Swift?

LLDB is the system debugger on macOS, iPadOS, iOS, tvOS, and watchOS. It can also be used for Objective-C and Swift development for architectures: x86_64. i386, ARM and AArch64, and default debugger in Xcode on macOS. It supports debugging on desktop, in simulators and devices.


1 Answers

breakpoint set has an address option; you would type help breakpoint set to see all of them. For your specific example,

(lldb) br s -a 0x10000

(You can always use shorter versions of command names in lldb that are unambiguous so typing out breakpoint set isn't necessary)

like image 145
Jason Molenda Avatar answered Oct 20 '22 01:10

Jason Molenda