This is the mail archive of the gdb-prs@sourceware.org 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]
Other format: [Raw text]

[Bug threads/13582] issues with accessing errno in non-threadedprogram


http://sourceware.org/bugzilla/show_bug.cgi?id=13582

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-01-11 09:47:40 UTC ---
(In reply to comment #0)
> (gdb) p errno
> Cannot find thread-local variables on this target

This is work arounded in Fedora GDB the straightforward way of substituting it
by "*((int *(*) (void)) __errno_location) ()":
http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch;hb=master


> [and on amd64-linux gdb doesn't know __errno_location returns a 64-bit value
> and tries to deference the sign-extended 32-bit result]

This works on normal distros featuring debug info for system components.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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