Skip to main content



      Home
Home » Newcomers » Newcomers » Memory dump
Memory dump [message #267360] Sun, 28 December 2008 16:56 Go to next message
Eclipse UserFriend
Originally posted by: news.s237965939.online.de

In Eclipse 3.4 I have a J2ME project, but that should make no difference in
this case. I added a memory window to my view. The question now is how can i
look at a byte[] buf in hexdump? All menu items are greyed out and no
drag/drop is possible. Is that window an import of CDT and useless in Java?

TIA,
Hans
Re: Memory dump [message #267364 is a reply to message #267360] Sun, 28 December 2008 23:48 Go to previous messageGo to next message
Eclipse UserFriend
"Hans-J. Ude" <news@s237965939.online.de> wrote in message
news:gj8slr$40r$1@build.eclipse.org...
> In Eclipse 3.4 I have a J2ME project, but that should make no difference
> in
> this case. I added a memory window to my view. The question now is how can
> i
> look at a byte[] buf in hexdump? All menu items are greyed out and no
> drag/drop is possible. Is that window an import of CDT and useless in
> Java?


The online help describes what it does and how to use it, but it certainly
does seem to be referring to a product other than JDT. E.g., in "Adding a
variable, expression, or register to the Memory view", I read "Depending on
the debug engine that the debugger user interface is connected to, examples
of valid expressions include register names, variables, and HEX addresses."
This terminology makes me think it's not available for Java.

I'm guessing that perhaps the Memory view is Eclipse base functionality that
is available to any debug view in principle, but that is not used by the
JDT. It would be nice if there was a way to turn things like that off in
Eclipse, but it's actually rather difficult.

You might be able to get approximately the functionality you want, though,
by creating a custom Detail Formatter in the Variables view. You can read a
bit more about that in the online help. By default objects are displayed
with a detail formatter that just calls "toString()" but you can customize
that. You still won't be able to easily view an arbitrary object as a hex
dump, but maybe your actual problem is not that general.

You might also want to look for third-party plug-ins that do this; perhaps
someone else has figured out how.
Re: Memory dump [message #267374 is a reply to message #267364] Mon, 29 December 2008 05:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: news.s237965939.online.de

Walter Harley wrote:
> "Hans-J. Ude" <news@s237965939.online.de> wrote in message
> news:gj8slr$40r$1@build.eclipse.org...
>> In Eclipse 3.4 I have a J2ME project, but that should make no difference
>> in
>> this case. I added a memory window to my view. The question now is how can
>> i
>> look at a byte[] buf in hexdump? All menu items are greyed out and no
>> drag/drop is possible. Is that window an import of CDT and useless in
>> Java?
>
>
> The online help describes what it does and how to use it, but it certainly
> does seem to be referring to a product other than JDT. E.g., in "Adding a
> variable, expression, or register to the Memory view", I read "Depending on
> the debug engine that the debugger user interface is connected to, examples
> of valid expressions include register names, variables, and HEX addresses."
> This terminology makes me think it's not available for Java.
>
> I'm guessing that perhaps the Memory view is Eclipse base functionality that
> is available to any debug view in principle, but that is not used by the
> JDT. It would be nice if there was a way to turn things like that off in
> Eclipse, but it's actually rather difficult.
>
> You might be able to get approximately the functionality you want, though,
> by creating a custom Detail Formatter in the Variables view. You can read a
> bit more about that in the online help. By default objects are displayed
> with a detail formatter that just calls "toString()" but you can customize
> that. You still won't be able to easily view an arbitrary object as a hex
> dump, but maybe your actual problem is not that general.
>
> You might also want to look for third-party plug-ins that do this; perhaps
> someone else has figured out how.
>

Thanks for the info, Walter. Seems to be a difficult task. I've already
searched google for [eclipse "debugger interfcace"]. Maybe it's worth to
think about writing such a plugin. But I've got no time for that right
now. Maybe someone else is already working on it. IMHO this is a basic
debugger feature but i'm from the C++ camp and haven't done that much
java with eclipse yet.

Hans
Re: Memory dump [message #267413 is a reply to message #267374] Tue, 30 December 2008 12:40 Go to previous message
Eclipse UserFriend
"Hans-J. Ude" <news@s237965939.online.de> wrote in message
news:gja9jt$ft$1@build.eclipse.org...
> Thanks for the info, Walter. Seems to be a difficult task. I've already
> searched google for [eclipse "debugger interfcace"]. Maybe it's worth to
> think about writing such a plugin. But I've got no time for that right
> now. Maybe someone else is already working on it. IMHO this is a basic
> debugger feature but i'm from the C++ camp and haven't done that much java
> with eclipse yet.

Java is different than C++ in this regard. C/C++ is based on the idea of
direct memory access (that is, pointers); Java intentionally hides the
concept of physical memory addresses. So viewing memory is much less useful
for Java than for C/C++. I don't know much about the JVM's debugging
interface but in fact I am not sure that it even allows debuggers to view
memory directly.

However, it would be nice if it were easier to switch to a hex view of the
data that the JVM will let us get at. And I would *love* to have an
"assembly view" in the debugger, so that I can step opcode by opcode through
the bytecode that the JVM has actually loaded, while viewing the JVM's
operand and local variable stacks.
Previous Topic:indenting/formatting an html source file
Next Topic:key bindings broken
Goto Forum:
  


Current Time: Sat May 31 08:04:52 EDT 2025

Powered by FUDForum. Page generated in 0.08371 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top