Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Sandeep Joshi" <sandeepjoshi.it@gmail.com>
To: "Sandeep Joshi" <sandeepjoshi.it@gmail.com>, gdb@sourceware.org
Subject: Re: GDB not able to debug files(dwarf2.0) loaded using add-symbol-file
Date: Thu, 04 Jan 2007 06:56:00 -0000	[thread overview]
Message-ID: <ad83c5670701032256lddba884j4762d8b362996438@mail.gmail.com> (raw)
In-Reply-To: <20070104033008.GA2223@nevyn.them.org>

Below is what 'find_pc_sect_psymtab' returned when i tried to set
breakpoint in the file added with 'add-symbol-file' command.

******************************************
Breakpoint 5, find_pc_sect_psymtab (pc=34148, section=0x9cd4324) at symtab.c:796
796             return (best_pst);

(gdb) p *best_pst
$2 = {next = 0x9ad046c, filename = 0x9ad0518
"net/sunrpc/auth_gss/gss_krb5_mech.c", fullname = 0x0,
  dirname = 0x99f1e78
"/home/joshis/sdk/usr/src/kernel/linux-2.6.11.12", objfile =
0x994b650,
  section_offsets = 0x9951800, textlow = 288, texthigh = 1076066628,
dependencies = 0x0, number_of_dependencies = 0,
  globals_offset = 4596, n_global_syms = 0, statics_offset = 149919,
n_static_syms = 259, symtab = 0x9ccdc50,
  read_symtab = 0x80fbf84 <dwarf2_psymtab_to_symtab>,
read_symtab_private = 0x9a01b44 "óvø", readin = 1 '\001'}

******************************************
Here the pc to be looked is is '34148' . It starts with first object
file i.e vmlinux and checks all the psymtabs for their code range. Now
for the above psymtab, Code range is 'textlow = 288, texthigh =
1076066628' and our PC lies in this. So this is set as best_pst and
function returns without checking the second objfile, which has the
perfect match for this PC. That is why gdb is not able to show the
sources correct.



On 1/4/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Wed, Jan 03, 2007 at 03:14:30PM +0530, Sandeep Joshi wrote:
> > Memory layout:
> >        Entry point: 0x40018000
> >        0x40018000 - 0x40060000 is .init
> >        0x40060000 - 0x40259644 is .text
> >        0x40259650 - 0x40259f78 is __ex_table
> >        0x40259f78 - 0x4025a278 is .pci_fixup
> >        0x4025a278 - 0x4025d8f0 is __ksymtab
> >        0x4025d8f0 - 0x4025ddf0 is __ksymtab_gpl
> >        0x4025ddf0 - 0x40266070 is __ksymtab_strings
> >        0x40266070 - 0x40266174 is __param
> >        0x40268000 - 0x402b8c10 is .data
> >        0x402b8c20 - 0x402d995c is .bss
> >
> > add-symbol-file ~/arm-linux-gdb/bin/test_trap4.out 0x83d8
>
> Then how does that overlap with the symbols for the kernel?  It
> shouldn't.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


  reply	other threads:[~2007-01-04  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22  4:21 Sandeep Joshi
2006-12-23 21:26 ` Daniel Jacobowitz
2007-01-03  9:44   ` Sandeep Joshi
2007-01-04  3:30     ` Daniel Jacobowitz
2007-01-04  6:56       ` Sandeep Joshi [this message]
2007-01-10  4:16         ` Daniel Jacobowitz

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=ad83c5670701032256lddba884j4762d8b362996438@mail.gmail.com \
    --to=sandeepjoshi.it@gmail.com \
    --cc=gdb@sourceware.org \
    /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