This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [Patch] Fix for -var-update to use natural format to compare
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: "Nick Roberts" <nickrob at snap dot net dot nz>
- Cc: "Daniel Jacobowitz" <drow at false dot org>, <gdb-patches at sources dot redhat dot com>
- Date: Wed, 23 Jan 2008 09:39:02 -0500
- Subject: RE: [Patch] Fix for -var-update to use natural format to compare
>> In DSF, we (sometimes) display all values at once. Can be nice for the user.
>
> You say it "Can be nice for the user." but you haven't really answered the
> first question:
>
> why do you want to keep track of the value in all formats?
>
> Why, for example, would a user want to see the value of a double as a
> decimal? It just seems to be a misleading thing to do.
Users will be users :-)
But you make a good point. The answer can be found in
http://dev.eclipse.org/mhonarc/lists/dsdp-dd-dev/msg01004.html
which I copied here:
"The DSF GDB debugger uses the detail pane in the variables, registers, and
expressions views to display the variable in all available formats at the same
time.
There is a bigger issue here though. The architecture of the debugger
integration in Eclipse separates the UI code (views, actions, etc) and the
non-UI code with an API that abstracts the details of the debugger back end.
However, GDB's design of the variable objects makes some assumptions about the
presentation of the data in the UI, and these assumptions are making it
somewhat difficult to create an efficient implementation of the non-UI layer
of the debugger integration. "
So, to paraphrase, in DSF don't make any assumptions on what the UI will
request, but instead, we give the UI the possibility to request any of the
formats at any time, without restrictions.
Hope this clarifies a bit.
Marc