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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2ADDAC433F5 for ; Tue, 26 Oct 2021 09:10:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E363860F0F for ; Tue, 26 Oct 2021 09:10:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E363860F0F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7B9EC83395; Tue, 26 Oct 2021 11:10:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="id9xYZft"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D62C83395; Tue, 26 Oct 2021 11:10:33 +0200 (CEST) Received: from mscreen.etri.re.kr (mscreen.etri.re.kr [129.254.9.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D82678336D for ; Tue, 26 Oct 2021 11:10:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ckim@etri.re.kr Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 26 Oct 2021 18:10:20 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: u-boot@lists.denx.de Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id c2d38be66177c5fc; Tue, 26 Oct 2021 18:10:20 +0900 DKIM-Signature: a=rsa-sha256; b=id9xYZftSO9Q7CrqHqEvMdu9ZtqaA64GiX9SP8+MpKab4XaLILkpf/VTowUWRd9Xbm7Jdf6i30 dGI03s1jyISG8MHwvQSCcO4hY8qpelleoMQJbYisJsw0e0dAKZe5az8ADyB3eH0YbN3bTIS19Wt+ jXAPJtXGpH6rR/oxeOVbR5c04NJ/sE/1hqM7tETxJbHkudhxq4fTw3TZUt8WozI5NEI4H1GAJTA5 9tM4gogI28KlwYeUj0y9c81UURE8Fkg8R5gm5rF+rLx3ZgAaO45fdARAo/BSP+4Q7l+0Tjq9LpyI UydZhFDLihxNlWZ1LEk9BnwgYsYfnhPzGKbthtMw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=lgOogzR9/sAFLyztnBveJAmjfe3boE241PT6lKtFre8=; 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 c6538df56177c5fb; Tue, 26 Oct 2021 18:10:20 +0900 From: "Chan Kim" To: "'U-Boot Mailing List'" References: <050a01d7c71d$824be570$86e3b050$@etri.re.kr> In-Reply-To: <050a01d7c71d$824be570$86e3b050$@etri.re.kr> Subject: RE: breakpoint not working in do_mmc_read (using qemu) Date: Tue, 26 Oct 2021 18:10:20 +0900 Message-ID: <001501d7ca49$4d3aee10$e7b0ca30$@etri.re.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQLX99LhlGhhpCTzZgAa4kDmMGpO96nkoYiQ X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi, (for those who don't know how to stop at breakpoints after relocation..) I came back to this problem today and found = https://shenki.github.io/debugging-u-boot-after-relocation/.=20 So by doing in gdb, b relocation_done (after you stop at relocation_done), print /x ((gd_t *)$r9)->relocaddr $1 =3D 0x67f6b000 Add-symbo-file u-boot $1 (type y) c (continue) Now you can stop at board_init_r or do_mmc_read! Hope that helps. Thanks Chan Kim > -----Original Message----- > From: U-Boot On Behalf Of Chan Kim > Sent: Friday, October 22, 2021 5:19 PM > To: U-Boot Mailing List > Subject: breakpoint not working in do_mmc_read (using qemu) >=20 > Hello, u-boot experts, >=20 >=20 >=20 > I need to modify a proprietary SD card host controller driver to be = used > in u-boot and I wanted to see the driver interface with the u-boot = using > qemu. >=20 > Trying to run u-boot on qemu with SD card, I found this nice question = : > = https://stackoverflow.com/questions/46239926/booting-kernel-from-sd-in- > qemu-arm-with-u-boot >=20 > So I followed it and saw =E2=80=98mmc rescan=E2=80=99, =E2=80=98mmc = read=E2=80=99 command works. >=20 > Using debugger (arm-none-eabi-gdb), I can follow the code from _start = and > can set breakpoint at board_init_f and etc. >=20 > But even if I set breakpoint at do_mmc_read or do_mmc_rescan, the > breakpoint for those functions are not working. >=20 > Could anyone tell me what I=E2=80=99m doing wrong? (Are there things I = should set > in the config?) >=20 > The qemu command is this : >=20 > qemu-system-arm -machine vexpress-a9 -cpu cortex-a9 -m 128M -dtb > ~/prj/abdsn/ab21sim/ab21tsim/LinuxDevDrv/linux- > 5.4.21/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel u-boot -sd = sd.img - > nographic -s -S >=20 > and the u-boot (ELF file) contains debug_info. >=20 > Any help will be deeply appreciated. >=20 > Thanks, >=20 > Chan Kim >=20 > p.s. BTW, this email list contains mostly PATCH emails between u-boot > developers, so I feel a little sorry to ask questions here. = =F0=9F=98=8A >=20 >=20