| Summary: | Inside the Memory View: A Guide for Debug Providers | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Community | Reporter: | Samantha Chan <chanskw> | ||||
| Component: | Articles | Assignee: | Wayne Beaton <wayne.beaton> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | avdievkaren, community.articles-inbox, normankyee, rayfix, sumeet.jauhar | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Samantha Chan
Created attachment 63262 [details]
Article
Do you know anybody who can peer review the article's content? Please ask Darin Wright from Debug to review this article. Hi, Just wondering if there is anything I need to do to move this forward? Thanks... Samantha I've posted a draft on the server: http://www.eclipse.org/articles/article.php?file=Article-MemoryView/index.html I've done an initial pass and will do a more thorough one tomorrow. In the meantime, you use the non-word "interfactions" about half-way through the text. What do you mean? Hi... Thanks for reviewing. "interfactions" is actually a typo. It should have spelt "interactions". Thanks... Samantha That's what I thought, but I wanted to be sure. Hi Wayne, Were you waiting for me to modify the article? Just wondering if there is a target date when this could be published? Thanks... Samantha I've published the article: http://www.eclipse.org/articles/article.php?file=Article-MemoryView/index.html Samantha, can you send me your coordinates (mailing address, phone number) and shirt size so that I can send you some swag in appreciation for your efforts (and patience)? Send the info to wayne@eclipse.org. Hi, I tried running the sample debug engine with Eclipse 3.3 and Eclipse 3.4 and it doesn't work. When I tried debugging the "Debug Nothing" launch configuration, nothing happened; I didn't see the Memory View open automatically as described in the article. Are there any plans to update the sample plugin to make it work with Eclipse 3.4? Can you please open a bug and describe the errors that you are receiving? I have been running the same sample during my testing and haven't come across with any error. If you switch to the Debug Perspective, and open the Debug View, do you see a debug session? Selecting a stackframe should open the memory view. Sorry, my mistake. I got it working now. Excellent article. I ran into some troubles because the Traditional renderer is broken when addressableSize > 1. (There are some bugs filed against it.) With the random addresses that this sample produces it is not immediately apparent, but if you look close you can see the problem. One of the problems for me is that there is a "Memory Browser" which is apparently a legacy viewer as well as "Traditional" renderer choice which doesn't have an id that lets get rid of it (that I could find). The exercise has you get rid of some of the renders which worked fine. But what I would really like to know is how to get rid of the traditional renderer since it is broken for my situation. (In reply to comment #13) > Excellent article. I ran into some troubles because the Traditional renderer > is broken when addressableSize > 1. (There are some bugs filed against it.) > With the random addresses that this sample produces it is not immediately > apparent, but if you look close you can see the problem. Thanks a lot for the feedback! :) > > One of the problems for me is that there is a "Memory Browser" which is > apparently a legacy viewer as well as "Traditional" renderer choice which > doesn't have an id that lets get rid of it (that I could find). The exercise > has you get rid of some of the renders which worked fine. But what I would > really like to know is how to get rid of the traditional renderer since it is > broken for my situation. The memory browser and the traditional rendering is provided by CDT. I am not aware of a way to get rid of it. Can you please open a defect in CDT debug, and describe what your requirements are. Please cc me on that defect since I do not watch CDT defects. I will work with the CDT team to see if there is anything we can do to make it easier. (In reply to comment #14) Can you please open a defect in CDT debug, > and describe what your requirements are. Please cc me on that defect since I > do not watch CDT defects. I will work with the CDT team to see if there is > anything we can do to make it easier. Thanks! Filed here https://bugs.eclipse.org/bugs/show_bug.cgi?id=294931 Hi again! Does anyone have any pointers on how to customize the expression window that pops up when you add a new monitor. I am providing a memory viewer for a target that has multiple pages and I would like to be able to somehow communicate that to the user. In this article, for example, there is a range of memory (0xAB123456 to 0xAB123556) that is read only and renders a special cool way. Is there anyway of putting information into the expression dialog (it seems to have a pulldown selection) or overriding entirely with something else that would show, for example, a memory map of the system, etc? Maybe this functionality doesn't exist but I thought I would put it out there just in case I am missing something easy. hello,
I've tried to implement simple viewer.
in my case, i have in a project Debugtarget, DebugElement and all implementation of debugger..
so in my MyDebugTarget i have
----------------------------------------------------------------------------
public IMemoryBlock getMemoryBlock(long startAddress, long length)
throws DebugException {
// TODO Auto-generated method stub
return new MyMemoryBlock (startAddress, length);
}
-----------------------------------------------------------------------------
and my MeMeryBlock =>
-----------------------------------------------------------------------------
public class MyMemoryBlock extends MyDebugElement implements IMemoryBlock {
long address, size;
IDebugTarget DebTarget;
byte [] content;
public MyMemoryBlock ( MyDebugTarget debTarget, long x, long y) {
super(debTarget);
address=x;
size=y;
DebTarget=debTarget;
content = new byte [(int)getLength()];
for (int i=0; i<content.length; i++) {
content [i]=(byte) i;
}
}
----------------------------------------------------------------------------
so my getByte is
----------------------------------------------------------------------------
public byte[] getBytes() throws DebugException {
// TODO Auto-generated method stub
return content;
}
----------------------------------------------------------------------------
when i lunch debugger ad my momory viewer [+] => adress 10 size 10
i have an empty viewer ... why ...???
Thanks for this wonderful article . I am however stuck trying to run it correctly . As mentioned in the article i try to provide an expression of the form sampleVariable = 10 . However the memory view that comes up doesnt contain `10` at the address of the sampleVariable . I even tried strings of the form str="Hello" Again it doesnt contain the string ``hello` at the address of the variable str . I hope that i am providing the input correctly ( ? ) . Also is the raw memory that i see system specific ? I mean i am running Eclipse 4.3 on a 64 bit Windows 7 . So can the way to see the raw memory differ across systems ? ( I am really not sure about this ) But the thing is that i see incorrect values in the addresses i give instead of seeing the values i provide to these variables . |