- 14 2月, 2020 1 次提交
-
-
由 chainhelen 提交于
According to #1800 #1584 #1038, `dlv` should enable the user to dive into memory. User can print binary data in specific memory address range. But not support for sepecific variable name or structures temporarily.(Because I have no idea that modify `print` command.) Close #1584.
-
- 13 2月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
A significant amount of time is spent generating the string representation for the proc.Registers object of each thread, since this field is rarely used (only when the Registers API is called) it should be generated on demand. Also by changing the internal representation of proc.Register to be closer to that of op.DwarfRegister it will help us implement #1838 (when Delve will need to be able to display the registers of an internal frame, which we currently represent using op.DwarfRegister objects). Benchmark before: BenchmarkConditionalBreakpoints-4 1 22292554301 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 17326345671 ns/op Reduces conditional breakpoint latency from 2.2ms to 1.7ms. Updates #1549, #1838
-
- 22 1月, 2020 2 次提交
-
-
由 Dmitry Neverov 提交于
-
由 Dmitry Neverov 提交于
Labels can help in identifying a particular goroutine during debugging. Fixes #1763
-
- 10 1月, 2020 1 次提交
-
-
由 aarzilli 提交于
Adds an API call that returns a list of packages contained in the program and the files that were used to build them, and also a best guess at which filesystem directory contained the package when it was built. This can be used by IDEs to map file paths if the debugging environment doesn't match the build environment exactly.
-
- 05 11月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Changes CreateBreakpoint to create a logical breakpoint when multiple addresses are specified, FindLocation and the api.Location type to return logical locations and the cli to support logical breakpoints.
-
- 02 11月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Modifies FindFileLocation, FindFunctionLocation and LineToPC as well as service/debugger to support inlining and introduces the concept of logical breakpoints. For inlined functions FindFileLocation, FindFunctionLocation and LineToPC will now return one PC address for each inlining and one PC for the concrete implementation of the function (if present). A proc.Breakpoint will continue to represent a physical breakpoint, at a single memory location. Breakpoints returned by service/debugger, however, will represent logical breakpoints and may be associated with multiple memory locations and, therefore, multiple proc.Breakpoints. The necessary logic is introduced in service/debugger so that a change to a logical breakpoint will be mirrored to all its physical breakpoints and physical breakpoints are aggregated into a single logical breakpoint when returned.
-
- 23 10月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Fixes #1713
-
- 26 9月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Add options to start a stacktrace from the values saved in the runtime.g struct as well as a way to disable the stackSwitch logic and just get a normal stacktrace.
-
- 28 7月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Implements #1640
-
- 17 7月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Add variables flag to mark variables that are allocated on a register (and have no address) and variables that we read as result of a function call (and are allocated on a stack that no longer exists when we show them to the user).
-
- 09 7月, 2019 1 次提交
-
-
由 dpapastamos 提交于
Support for rev {next,step} is not currently implemented.
-
- 01 7月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
* proc: allow simultaneous call injection to multiple goroutines Changes the call injection code so that we can have multiple call injections going on at the same time as long as they happen on distinct goroutines. * proc: fix EvalExpressionWithCalls for constant expressions The lack of address of constant expressions would confuse EvalExpressionWithCalls Fixes #1577
-
- 09 5月, 2019 2 次提交
-
-
由 Alessandro Arzilli 提交于
The initial implementation of the 'call' command required the function call to be the root expression, i.e. something like: double(3) + 1 was not allowed, because the root expression was the binary operator '+', not the function call. With this change expressions like the one above and others are allowed. This is the first step necessary to implement nested function calls (where the result of a function call is used as argument to another function call). This is implemented by replacing proc.CallFunction with proc.EvalExpressionWithCalls. EvalExpressionWithCalls will run proc.(*EvalScope).EvalExpression in a different goroutine. This goroutine, the 'eval' goroutine, will communicate with the main goroutine of the debugger by means of two channels: continueRequest and continueCompleted. The eval goroutine evaluates the expression recursively, when a function call is encountered it takes care of setting up the function call on the target program and writes a request to the continueRequest channel, this causes the 'main' goroutine to restart the target program by calling proc.Continue. Whenever Continue encounters a breakpoint that belongs to the function call injection protocol (runtime.debugCallV1 and associated functions) it writes to continueCompleted which resumes the 'eval' goroutine. The 'eval' goroutine takes care of implementing the function call injection protocol. When the expression is fully evaluated the 'eval' goroutine will write a special message to 'continueRequest' signaling that the expression evaluation is terminated which will cause Continue to return to the user. Updates #119
-
由 Alessandro Arzilli 提交于
This change splits the BinaryInfo object into a slice of Image objects containing information about the base executable and each loaded shared library (note: go plugins are shared libraries). Delve backens are supposed to call BinaryInfo.AddImage whenever they detect that a new shared library has been loaded. Member fields of BinaryInfo that are used to speed up access to dwarf (Functions, packageVars, consts, etc...) remain part of BinaryInfo and are updated to reference the correct image object. This simplifies this change. This approach has a few shortcomings: 1. Multiple shared libraries can define functions or globals with the same name and we have no way to disambiguate between them. 2. We don't have a way to handle library unloading. Both of those affect C shared libraries much more than they affect go plugins. Go plugins can't be unloaded at all and a lot of name collisions are prevented by import paths. There's only one problem that is concerning: if two plugins both import the same package they will end up with multiple definition for the same function. For example if two plugins use fmt.Printf the final in-memory image (and therefore our BinaryInfo object) will end up with two copies of fmt.Printf at different memory addresses. If a user types break fmt.Printf a breakpoint should be created at *both* locations. Allowing this is a relatively complex change that should be done in a different PR than this. For this reason I consider this approach an acceptable and sustainable stopgap. Updates #865
-
- 30 3月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
When we resolve a numerical value to a symbolic constant also report the numerical value, for clarity. Fixes #1516
-
- 28 3月, 2019 1 次提交
-
-
由 aarzilli 提交于
Add options to the stack command to read the goroutine ancestors. Ancestor tracking was added to Go 1.12 with CL: https://go-review.googlesource.com/c/go/+/70993/ Implements #1491
-
- 21 3月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Adds initial support for plugins, this is only the code needed to keep track of loaded plugins on linux (both native and gdbserial backend). It does not actually implement support for debugging plugins on linux. Updates #865
-
- 27 2月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
Type names need to be quoted when that expression is evaluated, by printing them quoted the user can just copy and paste the output.
-
- 05 1月, 2019 1 次提交
-
-
由 Derek Parker 提交于
The repository is being switched from the personal account github.com/derekparker/delve to the organization account github.com/go-delve/delve. This patch updates imports and docs, while preserving things which should not be changed such as my name in the CHANGELOG and in TODO comments.
-
- 10 11月, 2018 1 次提交
-
-
由 aarzilli 提交于
Users can create sparse maps in two ways, either by: a) adding lots of entries to a map and then deleting most of them, or b) using the make(mapType, N) expression with a very large N When this happens reading the resulting map will be very slow because loadMap needs to scan many buckets for each entry it finds. Technically this is not a bug, the user just created a map that's very sparse and therefore very slow to read. However it's very annoying to have the debugger hang for several seconds when trying to read the local variables just because one of them (which you might not even be interested into) happens to be a very sparse map. There is an easy mitigation to this problem: not reading any additional buckets once we know that we have already read all entries of the map, or as many entries as we need to fulfill the MaxArrayValues parameter. Unfortunately this is mostly useless, a VLSM (Very Large Sparse Map) with a single entry will still be slow to access, because the single entry in the map could easily end up in the last bucket. The obvious solution to this problem is to set a limit to the number of buckets we read when loading a map. However there is no good way to set this limit. If we hardcode it there will be no way to print maps that are beyond whatever limit we pick. We could let users (or clients) specify it but the meaning of such knob would be arcane and they would have no way of picking a good value (because there is no objectively good value for it). The solution used in this commit is to set an arbirtray limit on the number of buckets we read but only when loadMap is invoked through API calls ListLocalVars and ListFunctionArgs. In this way `ListLocalVars` and `ListFunctionArgs` (which are often invoked automatically by GUI clients) remain fast even in presence of a VLSM, but the contents of the VLSM can still be inspected using `EvalVariable`.
-
- 20 10月, 2018 1 次提交
-
-
由 Derek Parker 提交于
This patch allows the `trace` CLI subcommand to display return values of a function. Additionally, it will also display information on where the function exited, which could also be helpful in determining the path taken during function execution. Fixes #388
-
- 16 10月, 2018 2 次提交
- 25 9月, 2018 1 次提交
-
-
由 aarzilli 提交于
Instead of failing on the first goroutine we can't read save the error message and keep going. Fixes a bug reported on the mailing list: https://groups.google.com/d/msgid/delve-dev/3b3bfaa3-83d5-4676-b974-1fec40e5bf53%40googlegroups.com?utm_medium=email&utm_source=footer
-
- 20 9月, 2018 1 次提交
-
-
由 Derek Parker 提交于
Refactors some code, adds a bunch of docstrings and just generally fixes a bunch of linter complaints.
-
- 31 8月, 2018 1 次提交
-
-
由 aarzilli 提交于
Add a flag to Stackframe that indicates where the stack frame is the bottom-most frame of the stack. This allows clients to know whether the stack trace terminated normally or if it was truncated because the maximum depth was reached. Add a truncation message to the 'stack' command.
-
- 25 7月, 2018 1 次提交
-
-
由 aarzilli 提交于
Adds -defer flag to the stack command that decorates the stack traces by associating each stack frame with its deferred calls. Reworks proc.next to use this feature instead of using proc.DeferPC, laying the groundwork to implement #1240.
-
- 14 7月, 2018 1 次提交
-
-
由 aarzilli 提交于
Implements the function call injection protocol introduced in go 1.11 by https://go-review.googlesource.com/c/go/+/109699. This is only the basic support, see TODO comments in pkg/proc/fncall.go for a list of missing features. Updates #119
-
- 10 7月, 2018 1 次提交
-
-
由 aarzilli 提交于
Adds StartPC to proc.G, StartLoc to api.Goroutine and show the start location in the command line client when appropriate. Updates #1104
-
- 29 6月, 2018 1 次提交
-
-
由 aarzilli 提交于
Adds a field, DeclLine, to Variable containing the declaration line number of the variable.
-
- 27 6月, 2018 1 次提交
-
-
由 aarzilli 提交于
This pull request makes several changes to delve to allow headless instancess that are started with the --accept-multiclient flag to keep running even if there is no connected client. Specifically: 1. Makes a headless instance started with --accept-multiclient quit after one of the clients sends a Detach request (previously they would never ever quit, which was a bug). 2. Changes proc/gdbserial and proc/native so that they mark the Process as exited after they detach, even if they did not kill the process during detach. This prevents bugs such as #1231 where we attempt to manipulate a target process after we detached from it. 3. On non --accept-multiclient instances do not kill the target process unless we started it or the client specifically requests it (previously if the client did not Detach before closing the connection we would kill the target process unconditionally) 4. Add a -c option to the quit command that detaches from the headless server after restarting the target. 5. Change terminal so that, when attached to --accept-multiclient, pressing ^C will prompt the user to either disconnect from the server or pause the target process. Also extend the exit prompt to ask if the user wants to keep the headless server running. Implements #245, #952, #1159, #1231
-
- 12 6月, 2018 1 次提交
-
-
由 aarzilli 提交于
Displays the return values of the current function when we step out of it after executing a step, next or stepout command. Implementation of this feature is tricky: when the function has returned the return variables are not in scope anymore. Implementing this feature requires evaluating variables that are out of scope, using a stack frame that doesn't exist anymore. We can't calculate the address of these variables when the next/step/stepout command is initiated either, because between that point and the time where the stepout breakpoint is actually hit the goroutine stack could grow and be moved to a different memory address.
-
- 24 4月, 2018 1 次提交
-
-
由 aarzilli 提交于
Fixes #951
-
- 20 3月, 2018 1 次提交
-
-
由 Josh Soref 提交于
-
- 19 1月, 2018 1 次提交
-
-
由 Alessandro Arzilli 提交于
Much like the bug in issue #1031 and commit f6f6f0bf pointers can also escape to the heap and then have a zero address (and no children) when we autodereference. 1. Mark autodereferenced escaped variables with a 0 address as unreadable. 2. Add guards to the pretty printers for unsafe.Pointer and pointers. Fixes #1075
-
- 21 12月, 2017 1 次提交
-
-
由 aarzilli 提交于
Adds a configuration option (show-location-expr) that when activated will cause the whatis command to also print the DWARF location expression for a variable.
-
- 14 12月, 2017 2 次提交
- 08 12月, 2017 1 次提交
-
-
由 Denis Shevchenko 提交于
-