From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17ACDC43334 for ; Fri, 8 Jul 2022 01:12:18 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.95) (envelope-from ) id 1o9cXM-0006C5-AC; Thu, 07 Jul 2022 21:12:04 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (Exim 4.95) (envelope-from ) id 1o9cXK-0006Ae-EN for kernelnewbies@kernelnewbies.org; Thu, 07 Jul 2022 21:12:03 -0400 Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 8 Jul 2022 10:11:55 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send001-relay.gov-dooray.com with SMTP id 32842eb662c7845b; Fri, 08 Jul 2022 10:11:55 +0900 DKIM-Signature: a=rsa-sha256; b=Waek2No1XXRdIiekMw/LuxlxzsRJfumLEdJqUb3pR2Oi489Un8hxrZRNCvLxMp13TksDjy9NrY Su/d/QxLE6OyuK7krzijWiVDgLnugQKxAZJ0a2kVofpHJFjNkpYkr6umrOHBxuM8llxSwRqQY+7j 3gY1Td37IzDQ2Cfbw/OEa8R65EANh24qF6MKCXgZZbDp21S57/IsAP0Fd7ks8DGOSQKGLLOyBFmG rF4kvqsI+7/eZ6lIhUjZvJ6uILdxBdCJxrfS6kZq+TgqLZGupIwQc+t5iKYxN49m7RDRNbL9KNC0 mAmhi8JQvPgPeVCTLhksCdcQVOZq5lvqSZTDncXQ==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=hSAIEtwAJvjaGwWW1kSFcNGhsBaPrSewfRkqVDvDZfM=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id 967be75462c7845a; Fri, 08 Jul 2022 10:11:55 +0900 From: "Chan Kim" To: "'Richard'" , References: <03d101d891e3$ccfe9630$66fbc290$@etri.re.kr> <316b7e35-58c4-48fe-4b1b-0351fb17bc1a@systemli.org> In-Reply-To: <316b7e35-58c4-48fe-4b1b-0351fb17bc1a@systemli.org> Subject: RE: Can I debug busybox program running on a qemu virtual machine using gdb? Date: Fri, 8 Jul 2022 10:11:53 +0900 Message-ID: <042001d89267$b5ec7910$21c56b30$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQHtrodtydK0ha6mOP9GgE6O/KONXAG5oSxvrTui82A= X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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 >Sent: Friday, July 8, 2022 8:46 AM >To: kernelnewbies@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@kernelnewbies.org >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >_______________________________________________ >Kernelnewbies mailing list >Kernelnewbies@kernelnewbies.org >https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies