Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* solib-target.c info sharedlib range addresses FIXME?
@ 2007-08-02  1:36 Pedro Alves
  2007-08-02 19:36 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2007-08-02  1:36 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

Hi Daniel,

I was looking at this broken info sharedlibrary output on arm-wince ...

Current cvs:

(gdb) info shared
  From        To          Syms Read   Shared Object Library
(...)
0x00bc1000  0x009ab708  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtguid4.dll
0x01581000  0x0025da90  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtcored4.dll
0x017d1000  0x6fbc6280  Yes
/cygdrive/d/cegccsf/cegcc/cegcc/src/build-mingw32ce/mingw/mingwm10.dll
(...)

(notice that 'To < From' - visible on big libs)

... and noticed you left a commented out fix in the code.  Any
reason not to uncomment it?

Patched:

(gdb) info shared
  From        To          Syms Read   Shared Object Library
(...)
0x00bc1000  0x0155b708  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtguid4.dll
0x01581000  0x017cda90  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtcored4.dll
0x017d1000  0x017d6280  Yes
/cygdrive/d/cegccsf/cegcc/cegcc/src/build-mingw32ce/mingw/mingwm10.dll
(...)
(gdb)

Cheers,
Pedro Alves


[-- Attachment #2: solib_target_solib_ranges.diff --]
[-- Type: text/x-diff, Size: 757 bytes --]

	* solib-target.c (solib_target_relocate_section_addresses):
	Add orig_delta to addr_high.

---
 gdb/solib-target.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: src/gdb/solib-target.c
===================================================================
--- src.orig/gdb/solib-target.c	2007-08-02 02:15:10.000000000 +0100
+++ src/gdb/solib-target.c	2007-08-02 02:24:00.000000000 +0100
@@ -332,7 +332,8 @@ solib_target_relocate_section_addresses 
 	  so->addr_low = segment_bases[0];
 	  so->addr_high = (data->segment_bases[i - 1]
 			   + data->segment_sizes[i - 1]
-			   /* FIXME this must be needed! + orig_delta */);
+			   + orig_delta);
+	  gdb_assert (so->addr_low <= so->addr_high);
 
 	  free_symfile_segment_data (data);
 	}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: solib-target.c info sharedlib range addresses FIXME?
  2007-08-02  1:36 solib-target.c info sharedlib range addresses FIXME? Pedro Alves
@ 2007-08-02 19:36 ` Daniel Jacobowitz
  2007-08-05 10:00   ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-08-02 19:36 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On Thu, Aug 02, 2007 at 02:35:12AM +0100, Pedro Alves wrote:
> Hi Daniel,
> 
> I was looking at this broken info sharedlibrary output on arm-wince ...
> 
> Current cvs:
> 
> (gdb) info shared
>  From        To          Syms Read   Shared Object Library
> (...)
> 0x00bc1000  0x009ab708  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtguid4.dll
> 0x01581000  0x0025da90  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtcored4.dll
> 0x017d1000  0x6fbc6280  Yes
> /cygdrive/d/cegccsf/cegcc/cegcc/src/build-mingw32ce/mingw/mingwm10.dll
> (...)
> 
> (notice that 'To < From' - visible on big libs)
> 
> ... and noticed you left a commented out fix in the code.  Any
> reason not to uncomment it?

Er, whoops!  I must have meant to get back to this before posting the
patch, and failed to do so.  Sorry.  I'm guessing that third library
was relocated downwards?

> 	* solib-target.c (solib_target_relocate_section_addresses):
> 	Add orig_delta to addr_high.

Yes, thanks.  It certainly is necessary :-)

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: solib-target.c info sharedlib range addresses FIXME?
  2007-08-02 19:36 ` Daniel Jacobowitz
@ 2007-08-05 10:00   ` Pedro Alves
  0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2007-08-05 10:00 UTC (permalink / raw)
  To: gdb-patches

Daniel Jacobowitz wrote:
> On Thu, Aug 02, 2007 at 02:35:12AM +0100, Pedro Alves wrote:
>> Hi Daniel,
>>
>> I was looking at this broken info sharedlibrary output on arm-wince ...
>>
>> Current cvs:
>>
>> (gdb) info shared
>>  From        To          Syms Read   Shared Object Library
>> (...)
>> 0x00bc1000  0x009ab708  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtguid4.dll
>> 0x01581000  0x0025da90  Yes         /cygdrive/d/Qt/qtce/qt/lib/qtcored4.dll
>> 0x017d1000  0x6fbc6280  Yes
>> /cygdrive/d/cegccsf/cegcc/cegcc/src/build-mingw32ce/mingw/mingwm10.dll
>> (...)
>>
>> (notice that 'To < From' - visible on big libs)
>>
>> ... and noticed you left a commented out fix in the code.  Any
>> reason not to uncomment it?
> 
> Er, whoops!  I must have meant to get back to this before posting the
> patch, and failed to do so.  Sorry.  I'm guessing that third library
> was relocated downwards?
> 

Yep, its image base is 0x6fbc0000.  The other two both go up from 0x10000.


>> 	* solib-target.c (solib_target_relocate_section_addresses):
>> 	Add orig_delta to addr_high.
> 
> Yes, thanks.  It certainly is necessary :-)
> 

Checked in.  Thanks.

Cheers,
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-05 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-02  1:36 solib-target.c info sharedlib range addresses FIXME? Pedro Alves
2007-08-02 19:36 ` Daniel Jacobowitz
2007-08-05 10:00   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox