From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18984 invoked by alias); 28 Oct 2014 16:02:04 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 18962 invoked by uid 89); 28 Oct 2014 16:02:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: sapo.pt Received: from relay2.ptmail.sapo.pt (HELO sapo.pt) (212.55.154.22) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 28 Oct 2014 16:02:00 +0000 Received: (qmail 8910 invoked by uid 0); 28 Oct 2014 16:01:56 -0000 Received: from unknown (HELO php07) (10.134.37.56) by relay2 with SMTP; 28 Oct 2014 16:01:56 -0000 Received: (qmail 20051 invoked by uid 64140); 28 Oct 2014 16:01:56 -0000 Received: from gtDEI-NATgw2.dei.uc.pt (gtDEI-NATgw2.dei.uc.pt [193.137.203.231]) by mail.sapo.pt (Horde Framework) with HTTP; Tue, 28 Oct 2014 16:01:56 +0000 Date: Tue, 28 Oct 2014 16:02:00 -0000 Message-ID: <20141028160156.Horde.uvcacyDQQ900l0BFN1Pemw5@mail.sapo.pt> From: joaoandreferro@sapo.pt To: gdb@sourceware.org Subject: Doubt using "set" command with registers User-Agent: Dynamic Internet Messaging Program (DIMP) PTMail 5.2.46 X-PTMail-Version: PTMail 5.2.46 X-PTMail-User: eyJpdiI6IkJPMjd2bE5QZUVmUlprc3owYUpXMGc9PSIsImQiOiJNMkdkdCtZN00rXC85RjdTaWhQR0V4bm4rOE1nUDY4YVFVaWIzb2tGQjQ0TT0ifQ== Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00114.txt.bz2 Hello all, I've been using GDB (in fact, conjuged with KGDB) lately to do some=20=20 kernel debugging. I've been testing some GDB commands, and a doubt=20=20 arised while using the "set" command, trying to change the value of=20=20 some registers. I've been able to successfully change the value of all=20=20 the registers provided by the "info registers" command (i. e., in my=20=20 case $eax, $ecx, $edx, $ebx, $esp, $ebp, $esi, $edi, $eip, $eflags,=20=20 $cs, $ss, $ds, $es, $fs and $gs) *except* for $esp, $ss, $fs and $gs.=20=20 Why is it so? I've been making these tests after hitting a hardware=20=20 breakpoint, then I set the values with e. g. "set $es =3D 0xf1c2007c",=20=20 and verifiy the assignemt with "info reg $es". As I've pointed out, it=20=20 works with the majority of the registers, except for that four (in=20=20 this particular case, the first command doesn't output any error, but=20=20 the second command shows me that the registers remain with the initial=20=20 value). By the way, I've started GDB with the -write option (checked=20=20 it inside GDb with the "show write" command). My GDB version is 7.2. If someone knows something about this situation and can share it with=20=20 me, it would be great. Best regards, Jo=C3=A3o