pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/SuboptimalEng/cpp-tutorials/tree/main/011-lldb-init-settings

el="stylesheet" href="https://github.githubassets.com/assets/repository-3aa75d4cd2374bb7.css" /> cpp-tutorials/011-lldb-init-settings at main · SuboptimalEng/cpp-tutorials · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

LLDB Init Settings

TL;DR

  • It is tedious to set up LLDB commands every time you compile C++ code (or re-open LLDB)
  • For example, you may need to run these 2 commands on restart (every time)
    • b main (break point at main)
    • target stop-hook add -o "disassemble" (show assembly)
  • You can avoid this repetitive process by adding creating the ~/.lldbinit file

Video Overview

  • Go over sample C++ code
  • Show how to run LLDB by using -g compiler flag
  • Show the need for using b main and target stop-hook add -o "disassemble"
  • Change code, recompile, re-run LLDB, and notice that the settings are lost
  • Show how setting up the ~/.lldbinit file solves this problem

LLDB Init Settings

  • Add the settings with vim ~/.lldbinit
# vim ~/.lldbinit

# lldb (gdb)
# custom settings

# break point at main
breakpoint set --name main

# show assembly by default
target stop-hook add -o "disassemble"

# use this instead if you want to see 10 lines of assembly at program counter
# target stop-hook add -o "disassemble --pc --count 10"

Titles

  • How to Customize LLDB Settings to Debug C++ on MacOS
  • How to Improve LLDB Debugger Developer Experience?
  • How to Improve LLDB (gdb) Developer Experience for Debugging?
  • How to Improve LLDB (GDB) Developer Experience with Custom Settings

References

  • ChatGPT
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy