# Debugging seL4 elfloader using lauterbach failed to step into c code

**URL:** <https://sel4.discourse.group/t/debugging-sel4-elfloader-using-lauterbach-failed-to-step-into-c-code/921>\
**Category:** seL4 kernel\
**Tags:** arm\
**Created:** [October 28, 2024, 8:50am UTC](https://sel4.discourse.group/t/debugging-sel4-elfloader-using-lauterbach-failed-to-step-into-c-code/921 "2024-10-28T08:50:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anishkhannayellapu](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@anishkhannayellapu](https://sel4.discourse.group/u/anishkhannayellapu)\
**Post date:** [October 28, 2024, 8:50am UTC](https://sel4.discourse.group/t/debugging-sel4-elfloader-using-lauterbach-failed-to-step-into-c-code/921/1 "2024-10-28T08:50:27Z")

</div>

Hi Team,

**Setup:**  
seL4 Version : 13  
Debugging: Debugging ELFloader code  
Platform: arm64  
Build Type: CMAKE\_BUILD\_TYPE:STRING=Debug

I have compiled the seL4 for arm64 based hardware and able to run seL4 kernel from elfloader successfully.  
For Debugging i have enabled debug symbols as mentioned above. Now on target, i have attached lauterbach to debug further. I am able to see all symbols and breakpoint is getting hit from break.list, when i tried to set breakpoint from c code. But unfortunately step into c code is not working. if i set break point from multiple c files, still breakpoint is gettting hit, but step into c code is not working, only working in assembly.

Is seL4 debugging tried with JTAG ?

---

<div class="post-metadata">

**Author:** ![Indan](https://yyz2.discourse-cdn.com/free1/user_avatar/sel4.discourse.group/indan/32/185_2.png) [@Indan](https://sel4.discourse.group/u/Indan)\
**Post date:** [October 30, 2024, 1:35pm UTC](https://sel4.discourse.group/t/debugging-sel4-elfloader-using-lauterbach-failed-to-step-into-c-code/921/2 "2024-10-30T13:35:08Z")

</div>

You may be the first person doing this.

Maybe enabling CONFIG\_HARDWARE\_DEBUG\_API in seL4 makes it work? Or, if already enabled, disabling it?

I wouldn’t expect a hardware debugger to need any help from the running code though.

---

<div class="post-metadata">

**Author:** ![kent-mcleod2](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kent-mcleod2](https://sel4.discourse.group/u/kent-mcleod2)\
**Post date:** [October 30, 2024, 10:40pm UTC](https://sel4.discourse.group/t/debugging-sel4-elfloader-using-lauterbach-failed-to-step-into-c-code/921/3 "2024-10-30T22:40:27Z")

</div>

What is the format of the elfloader file being loaded? On Aarch64 the elfloader is expected to be relocatable and could be placed in a different memory location by u-boot than what is defined by the elfloader’s ELF file.

---

<div class="post-metadata">

**Author:** ![anishkhannayellapu](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@anishkhannayellapu](https://sel4.discourse.group/u/anishkhannayellapu)\
**Post date:** [November 4, 2024, 9:14am UTC](https://sel4.discourse.group/t/debugging-sel4-elfloader-using-lauterbach-failed-to-step-into-c-code/921/4 "2024-11-04T09:14:00Z")

</div>

> [@Indan](#):
>
> CONFIG\_HARDWARE\_DEBUG\_API

Hi Indan,  
Thanks for the info.  
The config mentioned is for seL4 kernel. Issue is currently observed in elfloader code.
