delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/24/02:48:06

Date: Mon, 24 Mar 1997 10:32:46 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Regis BOSSUT <bossut AT isen DOT fr>
cc: djgpp AT delorie DOT com
Subject: Re: How do I examine memory a la %gs:0x1234 with gdb ?
In-Reply-To: <3332A009.2C13@isen.fr>
Message-ID: <Pine.SUN.3.91.970324103220.1059B-100000@is>
MIME-Version: 1.0

On Fri, 21 Mar 1997, Regis BOSSUT wrote:

> Subject is simple, but I did not find the answer in the info files.
> I'm afraid I can't but would like to be wrong...

I think the easiest way to do that is to include in your program a
function that returns a value or values at that address, then make GDB
call it.  For example, suppose you write a function like this:

   unsigned gs_peek (unsigned offset);

Then you can make GDB print the value at %gs:0x1234 like so:

   (gdb) print gs_peek(0x1234)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019