This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Patch to handle compressed sections
On Fri, Apr 18, 2008 at 02:28:06PM -0700, Craig Silverstein wrote:
> } I see. Well, you could use bfd_getb32 twice... I just felt that the
> } eight copies of that line were excessive.
>
> Then you'd do something like
> size = (a << 32) + b;
> which likewise won't work well (well, will give a compiler warning) on
> 32-bit systems.
Not on 32-bit systems, on systems without a 64-bit type. I don't know
if that even describes any system GDB still compiles on.
> I agree the code ends up being verbose, but it's pretty
> straightforward and robust. Would you be ok with the code going in
> the way it is now?
Robust is not the word I'd use, since it'll silently drop bits if
the section is in fact monstrously huge. Of course, if you had such a
file and tried to open it on a system without a 64-bit type, this
seems like the least thing that would go wrong.
I've no objection to the current version.
--
Daniel Jacobowitz
CodeSourcery