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

 
 

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

Submitter:  Andrew <xxxajk>
Submitted:  Mon 27 May 2013 09:24:30 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  5 - Blocker Status:  Wont Do
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 08 Jan 2023 02:58:20 PM UTC, comment #2: 

The proposed fix will be merged to DDD, if the problem is reported with current versions of GDB, too.

Stefan Eickeler <eickeler>
Group administrator
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eickeler (Posted a comment)
  • -email is unavailable- added by xxxajk (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-08 eickeler StatusNone Wont Do
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code