Can I debug busybox program running on a qemu virtual machine using gdb?

Chan Kim ckim at etri.re.kr
Thu Jul 7 21:11:53 EDT 2022


Hi, 

Thanks for replying.
Actually, I just wanted to know what kernel config variables are needed to
make tftp work in vanilla linux.
I get the message "tftp: sendto: Network is unreachable". 
With another default config, I can use tftp on qemu machine but still the
kernel image size is big so I tried to reduce the size and reduce the
experiment cycle time. But now I know I can build my test platform driver
into a kernel module I can do away with it. Maybe I'll just try this
"finding minimal config for tftp " later.
(I though because the shell itself is the busybox, maybe I could find where
the program is loaded and set breakpoint in the tftp entrance or condition,
but couldn't find where busybox was loaded.)

Thank you.

Chan Kim

>-----Original Message-----
>From: Richard <richard_siegfried at systemli.org>
>Sent: Friday, July 8, 2022 8:46 AM
>To: kernelnewbies at kernelnewbies.org
>Subject: Re: Can I debug busybox program running on a qemu virtual machine
>using gdb?
>
>Hi,
>
>If the goal is only to understand tftp and it's not something hardware
>dependend I would debug it on my normal desktop system/notebook. My distro
>(debian) has a busybox package. It does not provide the symlinks to change
>the ARGV[0] but you can create them manually and then debug locally as
>usually with your prefered tool (emacs recommended :) ).
>
>If it has to be in quemu, I see no reason against it, the normal rules for
>remote debugging apply.
>
>-- Richard Sailer
>
>On 07/07/2022 11:27, Chan Kim wrote:
>> Hi all,
>>
>> I'm trying to track how tftp program runs when I run tftp provided by
>> busybox on qemu virtual machine.
>> I can debug the linux source but I cannot debug tftp (busybox) program.
>> Can I debug busybox program using gdb in this case?
>> Any hint or advice will be very appreciated.
>> Thank you!
>>
>> Chan Kim
>>
>>
>>
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>_______________________________________________
>Kernelnewbies mailing list
>Kernelnewbies at kernelnewbies.org
>https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies







More information about the Kernelnewbies mailing list