Skip to content

Commit 82833db

Browse files
committed
Update debugger docs on wide registers and debugging with Administrator privilege
1 parent 2ec6938 commit 82833db

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

docs/guide/index.md

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -549,22 +549,6 @@ widget. We can manage them using backend commands directly.
549549
- `breakpoint enable n`: enable the nth breakpoint
550550

551551

552-
### Viewing Registers Wider than 8 Bytes
553-
554-
Right now the debugger uses an `uint64_t` to represent a register value, and value wider than that is truncated. Until
555-
we have a proper fix for it, one can run a backend command to view the register value directly.
556-
557-
#### WinDbg/DbgEng
558-
559-
- `r`: show all registers and their values
560-
- `r <register-name>`: read the value of a specific register
561-
562-
#### LLDB
563-
564-
- `reg read -a`: show all registers and their values
565-
- `reg read <register-name>`: read the value of a specific register
566-
567-
568552
### Handle Fork
569553

570554
When a `fork` or `vfork` happens, LLDB follows the parent process by default. To change the behavior, one can set
@@ -603,6 +587,20 @@ workaround, we can check the symbols at or near a specific address.
603587
- `image lookup --address <address>`
604588

605589

590+
### Debugging target with Administrative/sudo privileges
591+
592+
#### WinDbg/DbgEng
593+
594+
- enable the "Run as Administrator" setting in the Debug Adapter Settings. This will launch the debug server (dbgsrv.exe) with administrator privileges, allowing it to debug processes that require elevated permissions. This setting applies to both launching new processes and attaching to existing ones.
595+
- You can also run Binary Ninja with Administrator privilege (not recommended).
596+
597+
#### LLDB
598+
599+
- Launch the process with the necessary privilege and connect to it using Binary Ninja debugger. See [Remote Debugging Guide](remote-debugging.md) for more details.
600+
- Or run the debug server with sudo and then use Binary Ninja debugger to connect to it. Then launch a process from there. See [Remote Debugging Guide](remote-debugging.md) for more details.
601+
- You must be an admin or in the \_developer group on macOS to debug.
602+
603+
606604
## Settings
607605

608606
Binary Ninja debugger provides a wide range of settings to tweak its behavior. There are two categories of settings, the
@@ -618,16 +616,6 @@ The second category affects the debug adapter, e.g., the executable path of the
618616

619617
There are some known issues and limitations with the current debugger. Here is a list including potential workarounds.
620618

621-
### Administrative Access
622-
623-
Cannot debug binaries that require Administrator (Windows) or root (Linux/macOS). There are several ways to get around it:
624-
625-
- On Windows with the DbgEng adapter, enable the "Run as Administrator" setting in the Debug Adapter Settings. This will launch the debug server (dbgsrv.exe) with administrator privileges, allowing it to debug processes that require elevated permissions. This setting applies to both launching new processes and attaching to existing ones.
626-
- On Windows, run Binary Ninja with Administrator privilege (not recommended).
627-
- Launch the process with necessary privilege, and connect to it using Binary Ninja debugger. See [Remote Debugging Guide](remote-debugging.md) for more details.
628-
- Must be an admin or in the \_developer group on macOS to debug.
629-
- This is tracked by https://github.com/Vector35/debugger/issues/563
630-
631619
### macOS
632620

633621
- For fat binaries on macOS, the currently viewed architecture will be debugged. For example, if a fat binary contains both x86 and arm code, and the current binary view is x86, then the debugger will debug x86 code in it.

0 commit comments

Comments
 (0)