helpDDD - Support: sr #108306, DDD on AVR disassembles SRAM, not...

 
 

sr #108306: DDD on AVR disassembles SRAM, not PROGMEM

Submitted by:  Andrew <xxxajk>
Submitted on:  Mon 27 May 2013 09:24:30 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 5 - BlockerStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 27 May 2013 09:38:15 AM UTC, comment #1:

Here is the fix:
In GDBAgent.C, just change two lines. the changes simply add
(void (*)()) to the disassemble string.

string GDBAgent::disassemble_command(string start, const char *end) const
{
string cmd;
if (type() != GDB)
return cmd;

normalize_address(start);
cmd = "disassemble (void (*)())" + start;

if (strlen(end) != 0)
{
string end_( end );
normalize_address(end_);
cmd += ", (void (*)())";
cmd += end_;
}
return cmd;
}

Andrew <xxxajk>
Mon 27 May 2013 09:24:30 AM UTC, original submission:

This is an old bug/problem that is supposedly GDB's fault.

If you prefix '(void (*)())' to the address to disassemble, GDB works properly, otherwise it attempts to disassemble from SRAM.

SRAM as far as GDB is concerned starts at 0x800000, and code at 0x00. This appears to be problematic in all versions of GDB from 7.1 to 7.6 (current), and nobody has, or wants to fix the issue.

I should be able to make a patch, and as far as I can tell, it should not affect any other architecture. This is very trivial to fix.

Andrew <xxxajk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by xxxajk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup