Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 296924 Details for
Bug 436183
utrace: orig_rax 0x00000000ffffffff not recognized as -1
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
GDB workaround created by an ashaming mistake.
gdb-i386-on-amd64-orig_rax.patch (text/plain), 2.01 KB, created by
Jan Kratochvil
on 2008-03-05 20:03:35 UTC
(
hide
)
Description:
GDB workaround created by an ashaming mistake.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2008-03-05 20:03:35 UTC
Size:
2.01 KB
patch
obsolete
>diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-orig/gdb/amd64-linux-nat.c gdb-6.7.1/gdb/amd64-linux-nat.c >--- gdb-6.7.1-orig/gdb/amd64-linux-nat.c 2008-03-05 20:44:07.000000000 +0100 >+++ gdb-6.7.1/gdb/amd64-linux-nat.c 2008-03-05 19:25:47.000000000 +0100 >@@ -237,6 +237,28 @@ supply_gregset (struct regcache *regcach > amd64_supply_native_gregset (regcache, gregsetp, -1); > } > >+static void >+amd64_linux_collect_native_gregset (const struct regcache *regcache, >+ void *gregs, int regnum) >+{ >+ struct gdbarch *gdbarch = get_regcache_arch (regcache); >+ >+ amd64_collect_native_gregset (regcache, gregs, regnum); >+ >+ if (gdbarch_ptr_bit (gdbarch) == 32) >+ { >+ /* Make sure %orig_eax gets sign-extended into %orig_rax as the value -1 >+ is compared in its full size by the kernel for i386 inferiors on the >+ amd64 debugger. */ >+ if (regnum == -1 || regnum == I386_LINUX_ORIG_EAX_REGNUM) >+ { >+ unsigned char *reg = (unsigned char *) gregs >+ + amd64_native_gregset32_reg_offset [I386_LINUX_ORIG_EAX_REGNUM]; >+ memset (reg + 4, (reg[3] & 0x80 ? 0xFF : 0x00), 4); >+ } >+ } >+} >+ > /* Fill register REGNUM (if it is a general-purpose register) in > *GREGSETP with the value in GDB's register cache. If REGNUM is -1, > do this for all registers. */ >@@ -245,7 +267,7 @@ void > fill_gregset (const struct regcache *regcache, > elf_gregset_t *gregsetp, int regnum) > { >- amd64_collect_native_gregset (regcache, gregsetp, regnum); >+ amd64_linux_collect_native_gregset (regcache, gregsetp, regnum); > } > > /* Transfering floating-point registers between GDB, inferiors and cores. */ >@@ -326,7 +348,7 @@ amd64_linux_store_inferior_registers (st > if (ptrace (PTRACE_GETREGS, tid, 0, (long) ®s) < 0) > perror_with_name (_("Couldn't get registers")); > >- amd64_collect_native_gregset (regcache, ®s, regnum); >+ amd64_linux_collect_native_gregset (regcache, ®s, regnum); > > if (ptrace (PTRACE_SETREGS, tid, 0, (long) ®s) < 0) > perror_with_name (_("Couldn't write registers"));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 436183
:
296924