News for hackers. Stuff that matters.
Re:Visual Debugging Now by eesmith on Saturday May 21, 2022 @03:33PM (#31461026)
> But the debugger is programmable itself, and uses Python natively as a scripting language.

like lldb? https://lldb.llvm.org/use/python.html

"""LLDB has been structured from the beginning to be scriptable in two ways – a Unix Python session can initiate/run a debug session non-interactively using LLDB; and within the LLDB debugger tool, Python scripts can be used to help with many tasks, including inspecting program data, iterating over containers and determining if a breakpoint should stop execution or continue."""

> Extend your favorite C++ compiler with a flag that generates python bindings for all data variable symbols.

The linked-to lldb documentation has a section on "Accessing & Manipulating Program Variables". I'm pretty sure it can all be built though the existing clang debug info.

Sounds pretty neat to access and visualize the inner workings of a C/C++ program as a program which works like an attached debugger.

Re:Visual Debugging Now by pmarin on Wednesday May 25, 2022 @12:04AM (#31500496)
This article reminds me a demo Eskil Steenberg did about a visual live memory debugger

https://youtu.be/pvkn9Xz-xks

Re:Visual Debugging Now by armchairhacker on Wednesday May 25, 2022 @12:03AM (#31500490)
When I debug, sometimes I write code which pretty-prints the object to stdout, and then execute that inline ("evaluate expression") when I need to.

It may be kind of hacky but it works well and it's super easy to implement. As a bonus, you usually end up pretty-printing the object in some debug-logger anyways.

Re:Visual Debugging Now by athrun on Tuesday May 24, 2022 @10:00PM (#31499808)
Asking the HN community: what are the modern options in terms of debugging native programs these days?

It seems that this is an area that hasn't seen much progress over the years.

Re:Visual Debugging Now by invalidname on Tuesday May 24, 2022 @10:37PM (#31499999)
rr is amazing...