Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
To: Elena Zannoni <ezannoni@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: 5.1 PATCH: Allow gdb to link on mips-sgi-irix5.3
Date: Mon, 30 Jul 2001 13:14:00 -0000	[thread overview]
Message-ID: <15205.49157.618358.173996@xayide.TechFak.Uni-Bielefeld.DE> (raw)

[For some reason, I didn't get a copy of this message, but only found it in
the mailing list archive.]

Elena Zannoni writes:

> For ths particualr error, can you take a look at the threads:
> http://sources.redhat.com/ml/gdb-patches/2001-05/msg00178.html
> http://sources.redhat.com/ml/gdb-patches/2001-05/msg00187.html A
> similar problem was reported but a fix was not generated. Hopefully
> the discussion there that can help pinpoint your problem.

Indeed, and I have already re-discovered this problem on Tru64 UNIX, see PR
gdb/182.  What's the problem with the fix above?  Without it, gdb on Tru64
UNIX is practically unusable.

The problem with O32/mdebug on IRIX is similar: the binary in question has
no data section, and running the mips-sgi-irix5.3 gdb under gdb reveals
that the value of the symbol that causes the internal error reported is
just the address of the .rodata section.

The problem seems to be that mdebugread.c first uses SC_IS_DATA() to
determine what section a symbol belongs to (which allows .data, .sdata,
.rodata etc. sections), and than only uses SECT_OFF_DATA, which only works
for the .data section.

Here's readelf -S output for reference:

There are 20 section headers, starting at offset 0x6538:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .interp           PROGBITS        00400134 000134 000013 00   A  0   0  4
  [ 2] .MIPS.options     MIPS_OPTIONS    00400148 000148 000080 00  Ao  0   0  8
  [ 3] .reginfo          MIPS_REGINFO    004001c8 0001c8 000018 18   A  0   0  4
  [ 4] .dynamic          DYNAMIC         004001e0 0001e0 000100 08   A  6   0  4
  [ 5] .liblist          MIPS_LIBLIST    004002e0 0002e0 000014 14   A  6   1  4
  [ 6] .dynstr           STRTAB          004002f4 0002f4 00017f 00   A  0   0  4
  [ 7] .hash             HASH            00400474 000474 0001b8 04   A  8   0  4
  [ 8] .dynsym           DYNSYM          0040062c 00062c 0002c0 10   A  6   4  4
  [ 9] .MIPS.symlib      MIPS_SYMBOL_LIB 004008ec 0008ec 00002c 01   A  8   5  1
  [10] .msym             MIPS_MSYM       00400918 000918 000160 08   A  6   0  4
  [11] .MIPS.stubs       PROGBITS        00400a78 000a78 000044 04  AX  0   0  4
  [12] .text             PROGBITS        00400ac0 000ac0 000180 01  AX  0   0 16
  [13] .init             PROGBITS        00400c40 000c40 000020 01  AX  0   0 16
  [14] .rodata           PROGBITS        10004000 004000 000010 01  WA  0   0 16
  [15] .got              PROGBITS        10004010 004010 00006c 04 WAp  0   0  4
  [16] .bss              NOBITS          1000407c 00407c 00000c 00  WA  0   0  4
  [17] .mdebug           MIPS_DEBUG      00000000 005000 001464 01      0   0  4
  [18] .compact_rel      PROGBITS        00000000 006464 000030 00      0   0  4
  [19] .shstrtab         STRTAB          00000000 006494 0000a4 00      0   0  0
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

> This seems to be a bogus regnumber that is outside the range defined
> for your target.

As Eli Zaretskii already pointed out, this error does not occur in a
mips-sgi-irix6.2 configuration.  Nonetheless the fix should probably go
into the mips-sgi-irix5.3 config, too.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE


             reply	other threads:[~2001-07-30 13:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-30 13:14 Rainer Orth [this message]
2001-07-31  1:40 ` Eli Zaretskii
2001-07-31  8:19   ` Andrew Cagney
2001-10-14 13:59     ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-07-26 14:42 Rainer Orth
2001-07-26 15:13 ` Elena Zannoni
2001-07-27  2:06 ` Eli Zaretskii
2001-07-27  4:55   ` Rainer Orth
2001-07-27  7:25     ` Eli Zaretskii
2001-07-27  7:28       ` Rainer Orth

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=15205.49157.618358.173996@xayide.TechFak.Uni-Bielefeld.DE \
    --to=ro@techfak.uni-bielefeld.de \
    --cc=ezannoni@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /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