Gmail Kalender Documents Foto Web selengkapnya »
Grup yang Baru-Baru Ini Dikunjungi | Bantuan | Masuk
Beranda Grup Google -
Pesan dari diskusi GDB: How to debug code at a different address than it was linked to
Grup tempat Anda mengeposkan pesan adalah grup Usenet. Pesan yang diposkan ke grup ini akan membuat alamat email Anda tampak oleh pengguna internet.
Pesan balasan Anda belum terkirim.
Pengeposan berhasil
 
Dari:
Kepada:
Cc:
Tindak lanjuti ke:
Tambahkan Cc | Tambahkan Tindak Lanjut ke | Edit Perihal
Perihal:
Validasi:
Untuk maksud verifikasi, ketik karakter yang Anda lihat dalam gambar di bawah atau angka yang Anda dengar dengan mengklik ikon aksesibilitas. Simak dan ketik angka yang Anda dengar
 
n...@neo.net  
Tampilkan profil   Terjemahkan ke bahasa Terjemahan (Tampilkan Aslinya)
 Opsi lainnya 25 Jun 2009, 19:02
Newsgroup: comp.os.linux.development.system
Dari: n...@neo.net
Tanggal: Thu, 25 Jun 2009 12:02:03 +0000 (UTC)
Lokal: Kam 25 Jun 2009 19:02
Perihal: Re: GDB: How to debug code at a different address than it was linked to

Juergen Beisert <jbeis...@netscape.net> wrote:
> Hi everyone,

> has someone experience how to use GDB to debug some code running at a
> different address than it was linked to? Note: GDB is connected via a JTAG
> tool to the target.

> I'm trying to debug some code linked to an address of my target's SDRAM area
> (0x30000000). But after reset a few hundred instructions are running at the
> address 0x00000000 instead, due to they are loaded from an external NAND
> memory into a CPU internal SRAM area at the beginning of its address space.
> I can step through all these assembler instructions, and after the code
> copies itself to the final address space gdb starts to display the source
> files and shows the lines where the CPU currently executes instructions
> from. I cannot change the linker script to link these reset relevant
> routines to the 0x00000000 address, because they are shared between the
> reset code and the high level code running at its final address area. It
> works, because everything calculates the addresses from offsets only
> (position independent code).

> Is there a way to tell GDB that the first hundred instructions are running
> from the real address at 0x00000000, but it should look for source file and
> line information as they where run from 0x30000000? Something like an
> address offset gdb should use to find the corresponding debug info in the
> local ELF iamge? I tried with the "section" command, but without success.
> Any (hidden) feature in gdb to do this?

There is some command "overlay" in the gdb - maybe it is that what you
are looking for? To be honest I haven't used it so far I've just read
gdb docs. In this doc they are mention about some kind of mapping memory.

The second advice - you may try to use "add-symbol-file" command.
If it doesn't solve your problem - sorry, I tried to help.

ne


    Teruskan  
Anda harus Masuk agar dapat mengeposkan pesan.
Untuk mengeposkan pesan, Anda harus terlebih dahulu bergabung ke grup ini.
Perbarui nama panggilan di laman setelan langganan sebelum mengeposkan.
Anda tidak memiliki izin yang diperlukan untuk mengeposkan.

Buat grup - Grup Google - Beranda Google - Persyaratan Layanan - Kebijakan Privasi
©2010 Google