avr-gcc-list
[Top][All Lists]
Advanced

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

AVR gdb misinterprets what function I am in


From: Carl Peto
Subject: AVR gdb misinterprets what function I am in
Date: Wed, 12 Jan 2022 12:00:24 +0000

Hi,

I don’t know if this is the correct mailing list. I’m looking for help with 
avr-gdb.

I'm not sure if this is a dumb question! I'm debugging a firmware image I 
wrote, connecting to  simulator via target remote. When I do disassemble 0, I 
get the correct assembly for address 0x0000 on my image (it's an AVR program by 
the way). But, gdb seems to think it's in some random function that has nothing 
to do with the startup code…

(gdb) disassemble 0x0000
Dump of assembler code for function 
_ZN5swift9RefCountsINS_21SideTableRefCountBitsEE11doDecrementILNS_13PerformDeinitE0EEEbm:
0x00000000 <+0>:    jmp    0x90    ;  0x90 <__init>
…
(this is the start of program memory at 0x0000 on the AVR chip, the reset 
vector and interrupt vectors)


As a sanity check, using avr-objdump, that symbol is not defined as 0x0000... 
00001186  w    F .text  00000226 
_ZN5swift9RefCountsINS_21SideTableRefCountBitsEE11doDecrementILNS_13PerformDeinitE0EEEbm

Why is gdb thinking the code at 0x0000 is in some other, random function? (It 
seems to change all the time, one random symbol after another, different each 
time I start a debugging session like this!)



reply via email to

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