Commit Graph
3 Commits
Author SHA1 Message Date
josh11bandJosh L 7edb0b8f59 Add more Dump methods for debugging (#4747)
Follow-on to #4669 . Did some manual testing, but may have not exercised
all code paths.

---------

Co-authored-by: Josh L <josh11b@users.noreply.github.com>
2025-01-06 17:26:28 +00:00
Jon Ross-Perkins ecda309c12 Change Dump functions to static where appropriate. (#4712)
Verified under LLDB these still appear callable; I'm expecting GDB to be
the same. My concern about debugger calls to static functions was just
wrong.
2024-12-18 23:58:01 +00:00
Jon Ross-PerkinsandDana Jansens 3ce0df67bb Add Dump functions to Check, Parse, and Lex (#4669)
- Provide `Check::Dump(context, arg)` and similar.
- gdb and lldb should do contextual lookup, and `call Dump(*this,
Lex::TokenIndex::Invalid)` has been tested with gdb.
- Since this is only for debug, keeps the functions fully separated from
code.
- Uses alwayslink to ensure objects are correctly linked, even though
there are no calls.
- `-Wno-missing-prototypes` is needed when we don't have forward
declarations.
- Code is not linked in opt builds, using `#ifndef NDEBUG`.
- This probably could be doing something in BUILD files with a
`select()`, but the `#ifndef` seemed easier.

This is based on #4620, but uses free functions instead of member
functions.

Co-authored-by: Dana Jansens <danakj@orodu.net>

---------

Co-authored-by: danakj <danakj@orodu.net>
2024-12-12 20:51:02 +00:00