public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Chan Kim" <ckim@etri.re.kr>
To: "'U-Boot Mailing List'" <u-boot@lists.denx.de>
Subject: RE: breakpoint not working in do_mmc_read (using qemu)
Date: Tue, 26 Oct 2021 18:10:20 +0900	[thread overview]
Message-ID: <001501d7ca49$4d3aee10$e7b0ca30$@etri.re.kr> (raw)
In-Reply-To: <050a01d7c71d$824be570$86e3b050$@etri.re.kr>

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/. 

So by doing in gdb,

b relocation_done
(after you stop at relocation_done),
print /x ((gd_t *)$r9)->relocaddr
$1 = 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 <u-boot-bounces@lists.denx.de> On Behalf Of Chan Kim
> Sent: Friday, October 22, 2021 5:19 PM
> To: U-Boot Mailing List <u-boot@lists.denx.de>
> Subject: breakpoint not working in do_mmc_read (using qemu)
> 
> Hello, u-boot experts,
> 
> 
> 
> 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.
> 
> 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
> 
> So I followed it and saw ‘mmc rescan’, ‘mmc read’ command works.
> 
> Using debugger (arm-none-eabi-gdb), I can follow the code from _start and
> can set breakpoint at board_init_f and etc.
> 
> But even if I set breakpoint at do_mmc_read or do_mmc_rescan, the
> breakpoint for those functions are not working.
> 
> Could anyone tell me what I’m doing wrong? (Are there things I should set
> in the config?)
> 
> The qemu command is this :
> 
> 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
> 
> and the u-boot (ELF file) contains debug_info.
> 
> Any help will be deeply appreciated.
> 
> Thanks,
> 
> Chan Kim
> 
> p.s. BTW, this email list contains mostly PATCH emails between u-boot
> developers, so I feel a little sorry to ask questions here. 😊
> 
> 





      reply	other threads:[~2021-10-26  9:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  8:19 breakpoint not working in do_mmc_read (using qemu) Chan Kim
2021-10-26  9:10 ` Chan Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001501d7ca49$4d3aee10$e7b0ca30$@etri.re.kr' \
    --to=ckim@etri.re.kr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox