bugSimulavr: an AVR simulator - Bugs: bug #47035, Crash after entering 'target...

 
 

bug #47035: Crash after entering 'target remote localhost:1212' in avr-gdb

Submitter:  Albrecht <albrecht>
Submitted:  Sun 31 Jan 2016 10:24:07 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  zfrdh
Open/Closed:  Closed Component Version:  * simulavr
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 03 Feb 2016 07:39:23 PM UTC, comment #1: 

Tests done for fix:

simulavr started with:

src/simulavr -g -d atmega328 -f ~/Downloads/boot.elf

gdb sessions starts via ddd with:

ddd --debugger /opt/avr_5.2.0/bin/avr-gdb ~/Downloads/boot.elf

gdb session tested:

0x00000000 in ?? ()
(gdb) set $pc=0x7ff0
(gdb)

assembly window output:

Dump of assembler code from 0x7ff0 to 0x80f0:
=> 0x00007ff0 <appStart+10>:    ijmp
   0x00007ff2 <appStart+12>:    .word   0xffff  ; ????
   0x00007ff4:  .word   0xffff  ; ????
   0x00007ff6:  .word   0xffff  ; ????
   0x00007ff8:  .word   0xffff  ; ????
   0x00007ffa:  .word   0xffff  ; ????
   0x00007ffc:  .word   0xffff  ; ????
   0x00007ffe <optiboot_version+0>:     cpc     r0, r18
   0x00008000:  Cannot access memory at address 0x8000

Result:
File was read from 0x7ff0 to 0x7fff with correct content, checked with avr-objdump. Last two bytes comes from

00007ffe <optiboot_version>:
    7ffe:       02 06           cpc     r0, r18

which is the same as displayed in gdb session.

Fix commit id is: 0c7c098cc52851b40063508db2718760f7e0823f

Klaus Rudolph <zfrdh>
Group administrator
Sun 31 Jan 2016 10:24:07 PM UTC, original submission:  

Output from simulavr:

$ simulavr -g -d atmega328 -f boot.elf
Waiting on port 1212 for gdb client to connect...
Connection opened by host 127.0.0.1, port -10566.
simulavr: cmd/gdbserver.cpp:320: word GdbServer::avr_core_flash_read(int): Assertion `0 <= addr && (unsigned) addr+1 < core->Flash->GetSize()' failed.
Aborted

Command sequence in ddd was:

(gdb) file boot.elf
Reading symbols from boot.elf...done.
(gdb) target remote localhost:1212
Remote debugging using localhost:1212
0x00000000 in ?? ()
(gdb)

To reproduce the issue, use the attached boot.elf

Albrecht <albrecht>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36223:  boot.elf added by albrecht (9KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zfrdh (Posted a comment)
  • -email is unavailable- added by albrecht (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-03 zfrdh StatusNone Fixed
        Assigned toNone zfrdh
        Open/ClosedOpen Closed
    2016-01-31 albrecht Attached File- Added boot.elf, #36223

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code