* Fix plist to support pointer-sized integer fields like size_t
Resolves#3448
The plist command previously rejected fields that were not pointer types,
even if they were pointer-sized integers (like size_t, uintptr_t) used to
store addresses.
Changes:
- Accept integer types with size equal to architecture pointer size
- Handle type validation for pointer-sized integers
- Assume pointer-sized integers point to outer structure type
This allows plist to work with structs like:
struct node {
size_t next; // Previously rejected, now works
size_t prev;
};
* Strip typedefs before checking if field is pointer-sized int
size_t and similar types are TypeCode.TYPEDEF, not TypeCode.INT.
We need to call strip_typedefs() to get the underlying type
(e.g., size_t -> unsigned long) before checking the type code.
Thanks to @jackmisbach for catching this issue!
* Add test cases for plist with size_t fields
- Add test struct with size_t next pointer to linked-lists.c
- Add test_command_plist_size_t_field() to both GDB and DBG test suites
- Tests verify plist correctly handles typedef-wrapped pointer-sized integers
* Fix include placement in linked-lists.c
Move stdint.h include to top of file with other includes
* Set dereference-limit in size_t test cases
Ensure the test runs with a sufficient dereference limit to traverse all 3 nodes
* Use explicit count flag instead of dereference-limit in size_t test
Use -c 3 flag to explicitly request 3 nodes, matching the pattern used in other plist tests
* Simplify size_t test to use -f value flag
Use -f value flag to only display the value field, avoiding issues with
size_t formatting. This matches the pattern in test_command_plist_flat_field
and provides a cleaner, more focused test of the core functionality.
* Add dbg tests to test suite
* Fix 0
* Check for OSError in OpportunisticTerminalControl
* Split tests tasks
* Fix go tests in LLDB
* Update TLS tests to handle LLDB failing to resolve %GS on LLDB
* Disable go-based x86 test for windbg commands on LLDB
* Fix listening to new modules being loaded in LLDB
* Force LLDB tests to run in series
Parallel execution is broken, anyway
* Fix mallocng tests in LLDB
* ptmalloc2: Always cast tcache counts to pointer during try-free
* Catch LLDB_INVALID_ADDRESS in LLDB symbol lookup
* Handle the binary formatting from LLDB in `test_vis_heap_chunks`
* Split GDB and DBG GDB Nix tests, remove DBG LLDB Nix tests
* Replace ParamSpec in type param list with explicit use
* Add mising dependencies in Ubuntu test targets
* Revert "Add mising dependencies in Ubuntu test targets"
This reverts commit bd56a6b9dc.
* Disable -fcf-protection in test binaries
* Disable LLDB tests on Ubuntu 22.04
We don't seem to even officially support it for pwndbg-lldb
* Add even even more tests
* Fix 0
* Fix 1
* Add heap tests
* Fix 0
* Match new module layout
* Fix a couple of tests
* Backport test binary changes to GDB suite
* build the mallocng binary as static and dynamic
* ng-slots and ng-slotu tests
* add musl to apt and pacman dev deps
* lint
* dont test for heap addr since donation is flaky
* add ng-group check
* add ng-meta test
* remove inconsistent check
* add ng-ctx test
* test ng-find
* ng-metaarea test
* make tests debugger agnostic
* buffer1 typo