Debugging ARM with GDB and Codelite
Posted: Fri Aug 02, 2013 2:29 am
I have an issue with trying to get gdb for arm running under codelite. See output below.
I have a bare metal project, and I can download and run the code and it works, in a Freescale Kinetis Freedom board using their drag and drop feature (board via usb looks like a drive). And I've been able to load the program using a P&E Micro ICE with gdb manually from the DOS Shell.
Problem is when I try and run gdb from codelite, doesn't work. I think two problems maybe.
If you look at the Starting Debugger line below it appears that the file to debug is set to "./bare_metal' not file name.
The other issue is this argument,
--command="C:\Users\dasfoo\AppData\Local\Temp\"
codelite_gdbinit.txt seems to contain some python code, this version of gdb doesn't support python scripting.
Any idea on how to get this working or am I barking up a tree.
I have a bare metal project, and I can download and run the code and it works, in a Freescale Kinetis Freedom board using their drag and drop feature (board via usb looks like a drive). And I've been able to load the program using a P&E Micro ICE with gdb manually from the DOS Shell.
Problem is when I try and run gdb from codelite, doesn't work. I think two problems maybe.
If you look at the Starting Debugger line below it appears that the file to debug is set to "./bare_metal' not file name.
The other issue is this argument,
--command="C:\Users\dasfoo\AppData\Local\Temp\"
codelite_gdbinit.txt seems to contain some python code, this version of gdb doesn't support python scripting.
Any idea on how to get this working or am I barking up a tree.
Code: Select all
Using gdbinit file: C:\Users\dasfoo\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\projects\devtests\kl25_bare\arm_full_monty\bare_metal
Launching gdb from : ./Debug
Starting debugger : C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q1\bin\arm-none-eabi-gdb.exe --interpreter=mi "./bare_metal"
DEBUG>>set new-console on
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
DEBUG>>00000023-break-insert -f -t main
DEBUG>>00000024-enable-pretty-printing
Debug session started successfully!
DEBUG>>00000025target remote 127.0.0.1:7224
DEBUG>>=thread-group-added,id="i1"
=thread-group-added,id="i1"
DEBUG>>~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130312-cvs\n"
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130312-cvs
DEBUG>>~"Copyright (C) 2012 Free Software Foundation, Inc.\n"
Copyright (C) 2012 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type "show copying"\nand "show warranty" for details.
DEBUG>>~"This GDB was configured as \"--host=i586-mingw32 --target=arm-none-eabi\".\nFor bug reporting instructions, please see:\n"
This GDB was configured as "--host=i586-mingw32 --target=arm-none-eabi".\nFor bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>&"./bare_metal: No such file or directory.\n"
DEBUG>>&"set new-console on\n"
DEBUG>>&"No symbol table is loaded. Use the \"file\" command.\n"
DEBUG>>^error,msg="No symbol table is loaded. Use the \"file\" command."
^error,msg="No symbol table is loaded. Use the \"file\" command."
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>&"No symbol table is loaded. Use the \"file\" command.\n"
DEBUG>>00000023^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="<PENDING>",pending="main",times="0",original-location="main"}
DEBUG>>00000024^done
DEBUG>>&"target remote 127.0.0.1:7224\n"
DEBUG>>~"Remote debugging using 127.0.0.1:7224\n"
Remote debugging using 127.0.0.1:7224
DEBUG>>=thread-group-started,id="i1",pid="42000"
=thread-group-started,id="i1",pid="42000"
DEBUG>>=thread-created,id="1",group-id="i1"
=thread-created,id="1",group-id="i1"
DEBUG>>~"0x0000093a in ?? ()\n"
0x0000093a in ?? ()
DEBUG>>*stopped,frame={addr="0x0000093a",func="??",args=[]},thread-id="1",stopped-threads="all"
DEBUG>>00000025^done
Successfully connected to debugger server
Applying breakpoints...
Applying breakpoints... done
DEBUG>>00000026-exec-continue
DEBUG>>00000026^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>*stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x0000093a",func="??",args=[]},thread-id="1",stopped-threads="all"
Program Received signal SIGTRAP
DEBUG>>00000027-stack-list-frames
DEBUG>>00000028-file-list-exec-source-file
DEBUG>>00000029-break-list
DEBUG>>00000027^done,stack=[frame={level="0",addr="0x0000093a",func="??"},frame={level="1",addr="0x00000c76",func="??"},frame={level="2",addr="0x00000c76",func="??"}]
DEBUG>>00000028^error,msg="No symbol table is loaded. Use the \"file\" command."
No symbol table is loaded. Use the "file" command.
DEBUG>>00000029^done,BreakpointTable={nr_rows="1",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="<PENDING>",pending="main",times="0",original-location="main"}]}