simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Crash after entering 'target remote localhost:1212'


From: Christian Taedcke
Subject: Re: [Simulavr-devel] Crash after entering 'target remote localhost:1212' in avr-gdb
Date: Mon, 01 Feb 2016 21:30:02 +0100

Hello Thomas,

i can reproduce the problem, but since i am new to simulavr i need some
guidance on how to fix this.
The problem seems to be that gdb tries to read the memory location
0x8000, but the controller only has 32k byte flash, so 0x8000 is an
invalid address.

Why does gdb try to read that address? Can you give me a hint where to
look?

Regards,
Christian

Am Sonntag, den 31.01.2016, 21:08 +0100 schrieb ThomasK:
> Hi Albrecht,
> 
> looks so, as simulavr had a problem with addresses from 0x8000. (as
> to 
> see in your logs below) Maybe a problem in GdbServer class.
> Christian 
> has made changes in november and extended PC from a 16bit value (aka 
> word) to a unsigned 32bit, but I assume, that this is correct and 
> GdbServer class can't handle it. Maybe create a bug ticket to track
> it. 
> I think, this bug should be easy to reproduce and so not difficult
> to 
> fix. :-)
> 
> cu, Thomas
> 
> 
> Am 31.01.2016 um 17:07 schrieb Albrecht Frenzel:
> > cmd/gdbserver.cpp:734 int GdbServer::gdb_get_addr_len(const char
> > *pkt, 
> > char a_end, char l_end, unsigned int *addr, int *len)
> > doesn't find the end of memory. Looks like memory corruption...
> > 
> > Albrecht
> > 
> > 
> > On 31.01.2016 15:27, Albrecht Frenzel wrote:
> > > Here is the tail of 'simulavr -G -d atmega328 -f boot.elf'
> > > output:
> > > 
> > > ...
> > > Sent: 
> > > $ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> > > ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff#
> > > 00
> > >  gdb -> Ack
> > > Recv: "$m7cc0,40#2a"
> > >  Ack -> gdb
> > > Sent: 
> > > $ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> > > ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff#
> > > 00
> > >  gdb -> Ack
> > > Recv: "$m7d00,40#f8"
> > >  Ack -> gdb
> > > Sent: 
> > > $ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> > > ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff#
> > > 00
> > >  gdb -> Ack
> > > Recv: "$m7d40,40#fc"
> > >  Ack -> gdb
> > > Sent: 
> > > $ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> > > ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff#
> > > 00
> > >  gdb -> Ack
> > > Recv: "$m7d80,40#00"
> > >  Ack -> gdb
> > > Sent: 
> > > $ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> > > ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff#
> > > 00
> > >  gdb -> Ack
> > > Recv: "$m7dc0,40#2b"
> > >  Ack -> gdb
> > > Sent: 
> > > $ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> > > ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff#
> > > 00
> > >  gdb -> Ack
> > > Recv: "$m7e00,40#f9"
> > >  Ack -> gdb
> > > Sent: 
> > > $1f92cdb7deb71124b6d08b3119f084b714bee9d08be1bfd085e08093810082e0
> > > 8093c00088e18093c10086e08093c20080e18093c4008ee0c1d0259a26e080e3#
> > > c5
> > >  gdb -> Ack
> > > Recv: "$m7e40,40#fd"
> > >  Ack -> gdb
> > > Sent: 
> > > $9cef31e0909385008093840036bbb09bfecf1d9aa8952150a9f7812c912c93e0
> > > f92eee24e39425e0d22e31e1c32e9ad0813479f497d08983a7d08981823811f4#
> > > 3d
> > >  gdb -> Ack
> > > Recv: "$m7e80,40#01"
> > >  Ack -> gdb
> > > Sent: 
> > > $82e005c0813811f486e001c083e083d06fc0823411f484e103c0853419f485e0
> > > 9bd066c0853541f47dd0882e7bd0912c982a880c991c5bc0863521f484e08cd0#
> > > 29
> > >  gdb -> Ack
> > > Recv: "$m7ec0,40#2c"
> > >  Ack -> gdb
> > > Sent: 
> > > $80e0e5cf843609f036c06cd06bd0b82e69d0a82e00e011e065d0f80181938f01
> > > be12facf71d0f5e4af1201c0ffcff401f7bee89507b600fcfdcfb401a0e0b1e0#
> > > b2
> > >  gdb -> Ack
> > > Recv: "$m7f00,40#fa"
> > >  Ack -> gdb
> > > Sent: 
> > > $2c911296ad0141505109fa01808130e0382bfb010901e7bee89511246e5f7f4f
> > > ba12eecff401d7bee89507b600fcfdcfc7bee8951dc0843769f434d033d0b82e#
> > > 8b
> > >  gdb -> Ack
> > > Recv: "$m7f40,40#fe"
> > >  Ack -> gdb
> > > Sent: 
> > > $31d042d08401f80185918f0124d0ba94d1f70ec0853739f437d08ee11cd085e9
> > > 1ad08fe094cf813511f488e027d02cd080e111d07ccf20e030e080e0a8959091#
> > > fd
> > >  gdb -> Ack
> > > Recv: "$m7f80,40#02"
> > >  Ack -> gdb
> > > Sent: 
> > > $c00097fd8091c6002f5f3f4f20389ee33907a1f708959091c00095fffccf8093
> > > c60008958091c00087fffccf8091c00084fd01c0a8958091c6000895e0e6f0e0#
> > > f2
> > >  gdb -> Ack
> > > Recv: "$m7fc0,40#2d"
> > >  Ack -> gdb
> > > Sent: 
> > > $98e1908380830895eddf803219f088e0f5dfffcf84e1dfcfcf93c82fe3dfc150
> > > e9f7cf91f1cf282e80e0e8dfe0e0ff270994ffffffffffffffffffffffff0206#
> > > fb
> > >  gdb -> Ack
> > > Recv: "$m8000,40#c5"
> > >  Ack -> gdb
> > > simulavr: cmd/gdbserver.cpp:320: word 
> > > GdbServer::avr_core_flash_read(int): Assertion `0 <= addr && 
> > > (unsigned) addr+1 < core->Flash->GetSize()' failed.
> > > Aborted
> > > 
> > > ---
> > > 
> > > The code is a bootloader.
> > > 
> > > 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)
> > > 
> > > Albrecht
> > > 
> > > 
> > > On 31.01.2016 12:02, Albrecht Frenzel wrote:
> > > > 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
> > > > 
> > > > Albrecht
> > > 
> > 
> > 
> > _______________________________________________
> > Simulavr-devel mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/simulavr-devel
> > 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]