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

Richard richard_siegfried at systemli.org
Fri Jul 8 21:19:14 EDT 2022



On 08/07/2022 10:36, Tom Mitchell wrote:
> On Thu, Jul 7, 2022 at 2:27 AM Chan Kim <ckim at etri.re.kr> 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!
> 
> Check the tftp options for verbose flags.   The granularity of gdb is finer
> than most connection problems.
> 
> tftp in busybox may be a subset of stand alone tftp.
> fire it up and see what "help" and other commands tell you.
> 
> As always tftp has two parts.
> Near and far.    Both the server and the client have verbos
> the server may log authentication or other errors.
> 
> It would help to run standalone tftp on a laptop and also install busybox in
> a scratch location to see if there are differences you care about.
> As a security risk tftp is full of troubles so firewalls and switches
> can drop traffic.
> gdb is too fine.   If you are building it add classic print statements
> to the verbose mode.
> Two programs, two firewalls, is the network local or wild west big
> with multiple hops and firewalls.


I agree, that's all pretty good advice




More information about the Kernelnewbies mailing list