delve/_fixtures
Andrei Matei aee401b69a
pkg/proc: populate pointer values (#3229)
* proc: add a test for dangling unsafe pointers

This new tests checks the behavior when dereferencing dangling pointers.
The behavior does not fully make sense; the test checks the current
behavior for now, which will be improved in subsequent commits.

* proc: populate pointer values

This patch changes how Value and Unreadable are populated for pointer
Variables. Before this patch, variables of kind reflect.Ptr did not have
their Value field populated. This patch populates it in
Variable.loadValue(), which seems natural and consistent with other
types of variables. The Value is the address that the pointer points to.
The Unreadable field was populated inconsistently for pointer variables:
it was never populated for an outer pointer, but it could be populated
for an inner pointer in pointer-to-pointer types. Before this patch,
in pointer whose value could not be read was not easily distinguishable
from a pointer with a value that could be read, but that cannot be
dereferenced (i.e. a dangling pointer): neither of these would be marked
as Unreadable, and both would have a child marked as Unreadable. This
patch makes it so that a pointer variable whose pointer value cannot be
read is marked as Unreadable.

Using this new distinction, this patch fixes a bug around dereferencing
dangling pointers: before, attempting such a dereference produced a
"nil pointer dereference" error. This was bogus, since the pointer was
not nil. Now, we are more discerning and generate a different error.
2023-01-04 09:07:23 -08:00
..
asmnilptr proc: fix signal handling during stepping (#2803) 2021-12-07 09:21:53 -08:00
break fix StepInstruction on 1 byte instruction with a software breackpoint (#3084) 2022-08-01 09:03:19 -07:00
buildtest cmd/dlv: subcommand 'dlv test' should switch to package directory (#2128) 2020-08-31 10:51:10 -07:00
cgostacktest Test windows/arm64 pipeline (#3200) 2022-12-05 15:21:52 -08:00
fputest proc: when converting registers to slices set Base address (#2517) 2021-06-02 13:46:24 -07:00
internal proc: support DW_AT_go_package_name (#1757) 2019-11-25 09:10:18 -08:00
issue1656 proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
issue2319 pkg/proc: fix for file reference handling with DWARF 5 compilation units (#2327) 2021-01-29 09:23:52 -08:00
nodisasm proc: fix next when disassembly fails 2018-08-29 16:11:18 -07:00
nomaindir proc: detect when Launching non-executable files 2016-06-30 09:39:18 +02:00
nopbreakpoint proc: fix breakpoint confusion on resume (#1738) 2019-10-28 14:55:32 -07:00
plugin1 proc,proc/native,proc/gdbserial: initial plugin support (#1413) 2019-03-20 10:32:51 -07:00
plugin2 proc,proc/native,proc/gdbserial: initial plugin support (#1413) 2019-03-20 10:32:51 -07:00
setymmreg proc/gdbserial: workaround for debugserver register set bug (#2770) 2021-10-30 11:51:02 -07:00
testvariablescgo Add support for windows/arm64 (#3063) 2022-09-21 13:39:44 -07:00
xmm0print proc: fix prettyprint for register components with large values (#3022) 2022-06-02 10:16:32 -07:00
badflags.go proc: fix RFLAGS corruption after call injection on amd64 (#3002) 2022-05-05 08:41:40 -07:00
binarytrees.go Improve stacktraces (#721) 2017-02-08 14:14:57 +01:00
bpcountstest.go proc: Continue does not work with breakpoints set on NOP (OSX) 2016-01-09 08:44:28 +01:00
bpfile terminal: Implements init file and source command 2015-10-04 10:32:38 -07:00
break.go tests: Add test for #149, fixed TestNextGeneral on tip 2016-02-28 16:44:22 -08:00
buildflagtest.go service/dap: Add buildFlags error checking and tests in launch requests (#2056) 2020-05-28 14:01:51 -07:00
callme.go Go 1.8 compatibility (part 2) (#667) 2017-02-07 13:07:18 -08:00
cat.go proc/gdbserial: fix redirect bugs with debugserver 2020-11-17 16:00:22 +01:00
cgodisass.go service/dap: limit disassembly range (#3045) 2022-07-15 13:29:44 +02:00
cgosigsegvstack.go proc: implement stacktrace of arm64 (#1780) 2020-01-21 09:11:20 -08:00
cgotest.go dwarf/line: Support for parsing multiple file tables 2015-08-29 14:51:27 -05:00
clientdo.go proc,prettyprint: guard against autodereferenced escaped pointers (#1077) 2018-01-19 15:50:28 +01:00
condperghitcount.go terminal/command: add -per-g-hitcount option to condition command (#3055) 2022-07-12 10:31:34 +02:00
consts.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
continuetestprog.go Underscore fixtures dir to ignore during test run 2014-06-09 10:55:18 -05:00
coreemptystring.go proc: fix reading of empty strings in core files 2018-03-08 11:58:03 -08:00
create_breakpoint_main.star terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
databpcountstest.go proc/native: low level support for watchpoints in linux/amd64 (#2301) 2021-05-06 10:33:56 -07:00
databpeasy.go Miscellaneous fixes for Windows native backend (#2736) 2021-10-13 08:43:54 -07:00
databpstack.go proc/gdbserver: support watchpoints (#2659) 2021-10-04 14:45:05 -07:00
debug_line_benchmark_data pkg/dwarf/line: improve performance 2017-11-03 20:57:04 +01:00
debug_line_c_data dwarf/line: Fixed DirIdx (index starts at one) (#1873) 2020-02-21 09:00:34 -08:00
decllinetest.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
defercall.go proc: bugfix: Next and normal calls to deferred function 2016-09-27 09:37:26 +02:00
deferstack.go proc,service,terminal: eval expressions in the scope of a deferred call 2018-10-16 08:40:07 -07:00
dotpackagesiface.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
doubleinline.go pkg/proc: handle double inlined calls (#2880) 2022-01-24 08:56:37 +01:00
dwzcompression.go proc_test: implement test for DWZ compressed DWARF 2018-05-23 13:59:45 -07:00
ebpf_trace.go pkg/proc/internal/ebpf: Fix handling of entry / return (#3081) 2022-07-29 12:00:32 +02:00
echo_expr.star terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
examinememory.go pkg,service: add cmd examinemem(x) for examining memory. (#1814) 2020-02-13 09:29:21 -08:00
exit.init cmd/dlv,terminal: fix accept-multiclient behavior 2018-12-03 09:58:29 -08:00
fatalerror.go service/dap: add throw reason to exception info (#2524) 2021-06-28 08:39:34 -07:00
find_array.star terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
fncall.go proc: fix index access to already-loaded string values (#3184) 2022-11-07 15:22:12 -08:00
genericbp.go proc: rewrite FindFileLocation to support generics 2021-10-02 15:44:30 +02:00
goroutine_start_line.star terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
goroutinebreak.go service/dap: fix goroutine id selection for hardcoded breakpoints (#2748) 2021-10-29 19:40:16 -07:00
goroutinegroup.go terminal,service: Add filtering and grouping to goroutines command (#2504) 2021-07-01 11:25:33 -07:00
goroutineLabels.go proc,service: expose goroutine pprof labels in api 2020-01-21 09:08:36 -08:00
goroutines-trace.go :* Improve trace subcommand output (#3091) 2022-08-04 10:10:54 +02:00
goroutinestackprog.go Extend the "frame" command to set the current frame. (#1110) 2018-03-22 10:02:15 -07:00
hcbpcountstest.go proc: better handling of hardcoded breakpoints (#2852) 2022-02-22 09:57:37 -08:00
http_server.go [WIP] pkg/proc: avoid target process leaks. (#2018) 2020-05-14 14:23:16 +02:00
ifaceembcall.go proc: skip autogenerated wrappers when stepping in and out 2020-03-31 10:04:36 -07:00
increment.go proc: next, stepout should work on recursive goroutines (#831) 2017-05-16 11:23:33 -07:00
integrationprog.go Launch prog from cli, also exit cleanly 2014-08-23 08:20:56 -05:00
is sue239.go proc: bugfix: status does not work with programs containing spaces 2015-10-04 12:01:09 -07:00
issue262.go proc: Continue does not work with breakpoints set on NOP (OSX) 2016-01-09 08:44:28 +01:00
issue305.go proc: bugfix: clearing temp breakpoints 2016-01-16 09:13:15 +01:00
issue332.go proc: bugs setting next breakpoints 2016-02-11 08:28:07 +01:00
issue384.go proc/variables: crash while reading unintialized variable 2016-01-31 20:14:17 +01:00
issue387.go terminal,service: auto-continue during next and step (#448) 2016-04-24 16:20:02 -07:00
issue406.go all: Spelling 2018-03-20 11:05:35 +01:00
issue419.go debugger: bugfix: make delve API thread safe 2016-02-24 17:49:30 -08:00
issue528.go go.mod: require go-delve/liner instead of peterh/liner (#2905) 2022-02-14 18:42:43 +01:00
issue561.go proc: Implement Step using Continue 2016-09-27 09:37:33 +02:00
issue573.go proc: Renamed temp breakpoints to internal breakpoints 2016-09-30 08:35:29 +02:00
issue594.go proc: changed windows backend to deal with simultaneous breakpoints (#598) 2016-10-21 21:51:34 -07:00
issue664.go Go 1.8 compatibility (part 2) (#667) 2017-02-07 13:07:18 -08:00
issue683.go Fix for #614 and #683 (#687) 2017-01-09 15:21:54 -08:00
issue871.go proc: auto-dereference local variables that escape to the heap 2017-08-01 11:20:25 -06:00
issue877.go Pass LD_/DYLD_ env vars to debugserver (fixes #877) (#910) 2017-07-18 12:57:41 -06:00
issue951.go proc: Flag shadowed arguments as shadowed 2018-04-23 10:13:21 -07:00
issue1101.go proc/native: fix race condition between Halt and process death (linux) 2018-03-06 09:06:19 -08:00
issue1264.go proc: allow breakpoint conditions to contain a single boolean variable 2018-07-09 17:25:47 -07:00
issue1374.go proc: Continue should always work after CallFunction 2018-10-17 09:07:36 -07:00
issue1432.go proc: make structMember work on pointer Variables created through cast 2018-12-03 10:00:22 -08:00
issue1469.go proc: workarounds for runtime.clone (#1470) 2019-02-26 09:22:33 -08:00
issue1531.go proc: Update map reading code for Go 1.12 (#1532) 2019-04-26 10:23:43 -07:00
issue1549.go tests: add benchmark for conditional breakpoints 2020-01-28 11:32:53 +01:00
issue1598.go terminal: update return value load configuration when it changes (#1602) 2019-07-08 10:27:31 -07:00
issue1601.go godwarf: support recursive types involving C qualifiers and typedefs (#1603) 2019-07-08 10:24:56 -07:00
issue1615.go proc: increase maximum string length when loading string for binary ops (#1620) 2019-07-16 13:11:35 -07:00
issue1795.go proc: fix inlined stack reading for midstack inlined calls 2020-01-10 09:04:48 +01:00
issue1817.go dwarf/line: make LineToPCIn behave like LineToPC for lines without stmt 2020-01-09 09:41:44 -08:00
issue2023.go cmd/dlv: do not ignore regex when tracing pid (#2069) 2020-06-02 12:07:03 -07:00
issue2078.go proc: refresh cur thread/sel g after ContineOnce errors (#2081) 2020-06-11 11:46:00 -07:00
issue2086.go proc: use file:line at entry point in skipAutogeneratedWrappersOut (#2089) 2020-07-21 13:44:04 -07:00
issue2113.go proc: prevent internal breakpoint conditions from failing 2020-09-01 15:01:39 +02:00
issue2138.go proc/native/windows: do not call _DebugBreakProcess on a stopped process (#2140) 2020-08-31 09:42:35 -07:00
issue2162.go pkg/proc: fix dlv panic when sameGCond is nil. (#2164) 2020-09-08 15:18:49 -07:00
issue2896.go terminal/colorize: avoid print multiple package by accidently ast.Node startPos==token.NoPos (#2898) 2022-02-10 09:50:31 -08:00
issue3194.go proc: extend macOS workaround to amd64 (#3204) 2022-12-05 09:46:24 -08:00
linked_list.star terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
livetestprog.go (Mostly) working multithreaded tracing implementation 2014-10-25 08:59:22 -05:00
locationsprog2.go Disassemble command 2016-02-11 16:59:07 -08:00
locationsprog3.go debugger/locations: prioritize exact matches of function names (#651) 2016-10-21 22:04:03 -07:00
locationsprog_generic.go proc,locspec: support setting breakpoints by func name on generic funcs (#2745) 2021-10-30 11:52:26 -07:00
locationsprog.go debugger/locations: if locspec isn't found try interpreting it as expr (#858) 2017-07-26 12:52:51 -06:00
locationsUpperCase.go Fix path lookup logic on Windows. 2016-02-05 14:45:27 -08:00
longstrings.go service/dap: increase default string loading limit and refactor (#2546) 2021-06-22 08:14:47 -07:00
loopprog.go _fixtures/loopprog: print less often (#2738) 2021-10-13 09:10:55 +02:00
math.go Go 1.7 compatibility (#524) 2016-05-29 12:20:09 -07:00
morestringarg.go proc: give unique addresses to registerized variables (#2527) 2021-07-02 18:37:55 +02:00
nextcond.go proc: next should not skip lines with conditional bps 2017-11-20 11:25:35 -08:00
notify-v2.go terminal: bugfix: deref of nil SelectedGoroutine switching goroutines (#829) 2017-05-08 11:16:14 -07:00
panic.go proc: implement target.Interface for core files 2017-04-18 13:25:11 -07:00
parallel_next.go command (next): Improvements for parallel programs 2015-08-20 09:32:59 -05:00
pkgrenames.go proc: support DW_AT_go_package_name (#1757) 2019-11-25 09:10:18 -08:00
plugintest2.go proc,proc/native,proc/gdbserial: initial plugin support (#1413) 2019-03-20 10:32:51 -07:00
plugintest.go proc,proc/native,proc/gdbserial: initial plugin support (#1413) 2019-03-20 10:32:51 -07:00
pr1055.go Remove limitation of exit notification only for specific API calls 2018-01-02 11:28:43 -08:00
redirect-input.txt cmd,proc,terminal,debugger: Support default file descriptor redirects 2020-09-01 21:50:27 +02:00
redirect.go cmd,proc,terminal,debugger: Support default file descriptor redirects 2020-09-01 21:50:27 +02:00
restartargs.go command/terminal: allow restart to change process args (#1060) 2018-01-18 14:16:11 -08:00
retstack.go stack command: -full flag prints local variables and arguments of all the functions on the stack trace 2015-09-18 08:34:21 +02:00
scopeescapevareval.go proc: lexical block support 2017-08-01 11:20:25 -06:00
scopetest.go proc: correctly mark closure variables as shadowed (#1674) 2019-09-15 11:40:35 -07:00
sigchldprog.go *: Closer close and use assertNoError for testcase (#2204) 2020-10-19 14:44:04 -07:00
sleep.go proc/core: add support for windows minidumps 2018-11-21 12:17:16 -08:00
stacktraceprog.go Implement stack command 2015-06-20 15:29:33 -05:00
starlark_map_iteration.star pkg/terminal: Fix starlark map iteration for maps > 64 entries (#1699) 2019-10-07 09:35:58 -07:00
stepintobug.go proc: skip autogenerated functions correctly (#2959) 2022-04-13 15:28:56 -07:00
stepoutret.go proc,service: display return values when stepping out of a function 2018-06-12 11:35:56 +02:00
switch_to_main_goroutine.star terminal: adds embedded scripting language (#1466) 2019-07-02 10:55:27 -07:00
test.c proc: make sure logical breakpoints map exists (#3115) 2022-08-22 12:48:34 -07:00
testargs.go proc: Fix command-line arguments on Windows (#501) 2016-04-21 14:20:38 -07:00
testdeadlock.go proc: catch fatal runtime errors (#1502) 2019-02-27 14:28:25 -08:00
testenv.go dap: support 'Env' attribute for launch requests (#2846) 2022-01-06 09:01:09 -08:00
testfnpos1.go proc,service/debugger: track how breakpoints were originally set (#3148) 2022-09-28 11:35:07 -07:00
testfnpos2.go proc,service/debugger: track how breakpoints were originally set (#3148) 2022-09-28 11:35:07 -07:00
testfnpos.go pkg/proc: populate pointer values (#3229) 2023-01-04 09:07:23 -08:00
testinline.go *: early fixes for go1.20 (#3180) 2022-12-05 09:02:22 -08:00
testnextdefer.go Improve 'next': return into deferred func 2015-05-09 12:44:38 -05:00
testnextnethttp.go proc: add test for attach/detach, fix detach (#773) 2017-03-28 09:30:27 -07:00
testnextprog.go Correctly handle hardware breakpoints across threads 2015-06-11 22:46:06 -05:00
testprog.go Fix: Linux - call wait4 on thread grp leader is broken 2015-06-26 22:10:09 -05:00
testrerecord.go *: add option to re-record recorded targets (#1702) 2019-10-21 11:48:04 -07:00
testreturnaddress.go Fix: Handle inability to find return addr 2015-08-10 10:45:33 -05:00
testruntimebreakpoint.go Handle runtime.Breakpoint 2015-04-25 14:13:35 -05:00
testshadow.go proc: lexical block support 2017-08-01 11:20:25 -06:00
teststep.go proc: step now goes to next line, including funcs 2016-01-24 15:48:36 -08:00
teststepconcurrent.go proc: Implement Step using Continue 2016-09-27 09:37:33 +02:00
teststepprog.go proc/test: fix TestStepCallPtr on linux/386 (#2193) 2020-10-12 15:07:24 -07:00
testthreads.go Introduce JSON-RPC service 2015-06-21 21:11:30 -05:00
testtoggle.go *: Adds toggle command (#2208) 2021-03-19 11:02:23 -07:00
testunsafepointers.go pkg/proc: populate pointer values (#3229) 2023-01-04 09:07:23 -08:00
testvariables2.go proc: allow type casts between compatible types (#3149) 2022-09-29 10:08:19 -07:00
testvariables_generic.go proc,dwarf/godwarf: support parametric types with dictionaries 2021-10-02 15:44:30 +02:00
testvariables.go service/dap: support auto-loading of unloaded interfaces (#2362) 2021-03-08 09:41:47 -08:00
traceperf.go Trace optimizations (#695) 2017-02-07 13:08:11 -08:00
workdir.go Flag to set working directory (#650) 2016-11-01 12:58:42 -07:00
zdebug_line_dwarf4 Miscellaneous debug_line improvements (#1999) 2020-04-09 13:57:44 -07:00