This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tracing broken if target doesn't do disconnected tracing


Pedro Alves wrote:
On Wednesday 07 April 2010 14:32:49, Stan Shebs wrote:
Yeah, it's been troubling me too. User-settable variables are GDB's traditional way of instructing GDB about user preferences, but the canned method of phrase construction is too lame to express what is really going on, which is "I prefer that targets to continue tracing after disconnect, whether or not the current target can actually do so". We could use something other than set/show, or invent a better method to produce output - there are other set/shows for which the verbiage is rather contorted.

Hmm, can you expand on what lameness you're referring to exactly?
Is it a technical limitation?

It's the requirement to describe the variable with a noun phrase like "foo bar of baz", so that the output can be "foo bar of baz is on" etc. For simple settings the algorithm is reasonable, but as the concept gets more complicated, the phrasing gets more tortured.


These commands seem to fall in a close category:

(gdb) apropos willingness
set can-use-hw-watchpoints -- Set debugger's willingness to use watchpoint hardware
set displaced-stepping -- Set debugger's willingness to use displaced stepping
show can-use-hw-watchpoints -- Show debugger's willingness to use watchpoint hardware
show displaced-stepping -- Show debugger's willingness to use displaced stepping

Maybe we could follow suit similarly, or instead say something
like: "Show whether GDB prefers to/that/whether ..."

These are perfect examples of the same problem - "willingness" is not the right word. What these flags really mean is "use if possible", but that's a verb in an imperative form plus a conditional, and it doesn't have a direct equivalent as a noun phrase. Ideally, the "use if possible" would be augmented with "and it's possible" or "but it's not possible for reason X" so that the user can see both that the setting is as desired, and whether the debugger is able to respect it.


Not a difficult extension to the command definition machinery, just have to spend some time on it.

Stan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]