This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug threads/13582] issues with accessing errno in non-threadedprogram
- From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 11 Jan 2012 09:47:40 +0000
- Subject: [Bug threads/13582] issues with accessing errno in non-threadedprogram
- Auto-submitted: auto-generated
- References: <bug-13582-4717@http.sourceware.org/bugzilla/>
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.