From: "David Mc Kenna" <mckennad@esatclear.ie>
To: crossgcc@sources.redhat.com,gdb@sources.redhat.com
Subject: GCC generation of symbols for use with GDB
Date: Tue, 02 Sep 2003 09:30:00 -0000 [thread overview]
Message-ID: <3f546318.729a.0@esatclear.ie> (raw)
Hi Folks,
I have come across a problem when I am compiling multi files using gcc which
are then used for debugging with GDB.
I have two files, startup.s and interrupts.c. Startup.s is an initialization
file for use with an ARM7TDMi core and interrupts.c is my main file. When I
try to generate my ELF file using the following command:
arm-elf-gcc.exe \
/c/test/headers/gnu/startup.s $1.c /c/test/gcc/interrupts/irq.o -mthumb -mthumb-interwork
-mcpu=arm7tdmi\
-g -Wall -nostartfiles -mlittle-endian -save-temps -O$2 \
-o $1.elf 2> error.out
It generates the ELF file successfully. But when I launch GDB and do
target sim, load, b main, I get the following error:
Internal error: pc 0x0 in read in psymtab, but not in symtab.
Next I placed the startup.s code into an inline assembly command which is placed
at the top of the C file, all is well. GDB behaves normally.
Any ideas? My version of gcc is gcc version 3.3.2 20030825 (prerelease) and
gdb is GNU gdb 20030901
My startup.s code is :
b test_start @ SVC 0x00
b UDINST_Startup @ Undefined Instr.UND 0x04
b SWI_Startup @ SWI _Startup SVC 0x08
b PABORT_Startup @ Prefetch Abort ABORT 0x0C
b DABORT_Startup @ Data Abort ABORT 0x10
b RESERVED
b IRQ_Startup @ IRQ _Startup IRQ 0x18
b FIQ_Startup @ FIQ _Startup FIQ 0x1C
UDINST_Startup:
ldr pc, [pc, #20] @ Undefined Instruction _Startup UND 0x04
SWI_Startup:
b ADI_SWI_Interrupt_Setup @ SWI _Startup SVC 0x08
PABORT_Startup:
ldr pc, [pc, #20] @ Prefetch Abort ABORT 0x0C
DABORT_Startup:
ldr pc, [pc, #20] @ Data Abort ABORT 0x10
RESERVED:
ldr pc, [pc, #20]
IRQ_Startup:
b ADI_IRQ_Interrupt_Setup @ IRQ _Startup IRQ 0x18
FIQ_Startup:
b ADI_FIQ_Interrupt_Setup @ FIQ _Startup FIQ 0x1C
.global UDINSTVector
UDINSTVector:
.word .Int_Return
.global SWIVector
SWIVector:
.word .Int_Return
.global PABORTVector
PABORTVector:
.word .Int_Return
.global DABORTVector
DABORTVector:
.word .Int_Return
.global RESERVEDVector
RESERVEDVector:
.word .Int_Return
.global IRQVector
IRQVector:
.word .Int_Return
.global FIQVector
FIQVector:
.word .Int_Return
.global Int_Return
.Int_Return:
SUBS pc, lr, #4 @ return from interrupt
.global test_start
test_start:
Thanks in advance,
Dave Mc Kenna
--
http://www.iol.ie
reply other threads:[~2003-09-02 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f546318.729a.0@esatclear.ie \
--to=mckennad@esatclear.ie \
--cc=crossgcc@sources.redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).