Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Mohammed, Moqtadir" <Moqtadir_Mohammed@reyrey.com>
To: "Daniel Jacobowitz" <drow@false.org>,
		"Jim Blandy" <jimb@codesourcery.com>
Cc: <gdb@sourceware.org>
Subject: RE: Can this be happening?
Date: Tue, 03 Jul 2007 22:46:00 -0000	[thread overview]
Message-ID: <D8FBABA1EF6F2E4DBCC88903F60691F30A44020A@houxchsvr.ucscorp.ucs.pvt> (raw)

> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org]On
> Behalf Of Mohammed, Moqtadir
> 
> > -----Original Message-----
> > From: Daniel Jacobowitz [mailto:drow@false.org]
> > 
> > On Tue, Jul 03, 2007 at 02:38:51PM -0700, Jim Blandy wrote:
> > > I don't know why the upper bits would be set.  GDB may be
> > > misinterpreting the information in the core file.
> > 
> > The kernel dumps it as 32-bit too.  It's not clear what 
> those bits are
> > for, but I bet they're really in your core dump and you 
> should ask the
> > kernel developers.
> > 
> > Moves from the segment registers may leave implementation 
> defined data
> > in the upper half register - but that's only for fairly old Intel
> > processors.
> 
> I didn't knew that the dump itself was 32 bit. Will check the 
> core dump code
> in kernel to see if it is truncating or not before dumping.
> 
Just for the record, I see that in
http://lxr.linux.no/source/fs/binfmt_elf.c#L1473

They truncate the segment registers to 16 bit for all the threads
in the process except the current thread whose regs do not get truncated:

There are two calls used : 
elf_core_copy_regs for the current thread
elf_core_copy_task_regs in elf_dump_thread_status() which truncates.

Since in my application, the thread that crashed was the current thread,
the registers were not truncated and which is probably why we see 32bit values.

Someone can please close the bug 2281.

Thanks,
Moqtadir


             reply	other threads:[~2007-07-03 22:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-03 22:46 Mohammed, Moqtadir [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-07-03 22:16 Mohammed, Moqtadir
2007-06-29 23:03 Mohammed, Moqtadir
2007-07-03 21:38 ` Jim Blandy
2007-07-03 21:54   ` Mark Kettenis
2007-07-03 21:58   ` Daniel Jacobowitz
2007-07-05 19:26     ` Balazs Scheidler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D8FBABA1EF6F2E4DBCC88903F60691F30A44020A@houxchsvr.ucscorp.ucs.pvt \
    --to=moqtadir_mohammed@reyrey.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=jimb@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox