This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: wrong htons() used?


On Thu, Oct 21, 1999 at 01:49:10PM -0700, J.T. Conklin wrote:

> Grant> I assume that what is happening is that it's using the htons()
> Grant> that would be applicible if gdb was going to execute on an
> Grant> big-endian ARM architecture, but I can't figure out where this
> Grant> happens...
> 
> This is quite odd, since htons() should be a function provided by your
> host system.  I can't find any htons() implementation or other config-
> ury that would override that.
> 
> When trying to track down problems like this, I often examine the pre-
> processed output of the sources to see if I find something unexpected.
> You can do this by grabbing the line make invokes, replacing -c with
> -E, and removing the -o etherdrv.o).
> 
> If that doesn't pan out, link with the -Map option to determine where
> it's pulling in htons.o

I'm confused.  I ran the source file through gcc -E, and all
looked well.  There was an extern decl for htons, and calls
to htons in the right places.

I built it with -Wl,-Map,gdb.map and htons shows up in the map
file, and everything works.

I don't know what I did to fix it, so I take out
-Wl,-Map,gdb.map and rebuild it without generating the map
file, and it doesn't work.

I put the -Wl,-Map,gdb.map back in, and this time htons
_doesn't_ show up in the map file and the binary doesn't work.

I can't figure out what I did to make it work that one time...

-- 
Grant Edwards
Grant.Edwards@comtrol.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]