From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14257 invoked by alias); 9 May 2007 10:09:53 -0000 Received: (qmail 14246 invoked by uid 22791); 9 May 2007 10:09:52 -0000 X-Spam-Check-By: sourceware.org Received: from bay0-omc2-s4.bay0.hotmail.com (HELO bay0-omc2-s4.bay0.hotmail.com) (65.54.246.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 May 2007 10:09:49 +0000 Received: from hotmail.com ([65.55.155.98]) by bay0-omc2-s4.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 9 May 2007 03:09:48 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 9 May 2007 03:09:48 -0700 Message-ID: Received: from 65.55.155.123 by by144fd.bay144.hotmail.msn.com with HTTP; Wed, 09 May 2007 10:09:48 GMT X-Sender: kal_pana@hotmail.com From: "Kalpana Ramamurthy" To: gdb-patches@sourceware.org Bcc: Subject: FW: RE: gdb 6.4 not allowing me to change the value of registers like $SP,$RBP and $RIP. Date: Wed, 09 May 2007 10:09:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00127.txt.bz2 > >On further debugging I noticed that when I comment out >observer_notify_target_changed () in >the function value_assign(), my registers stay intact. Basically until this >point, if I try to set a >register say $sp to some other value, the new value is reflected correctly >in the regcache. But >as soon as observer_notify_target_changed() is invoked, the new value of >$sp is replaced back >to its old value. This is because in register_raw_read(), the >target_fetch_registers() gets called which replaces all the registers from >my target. And my target fetches the registers from the >panic thread. > >Please help. > >Kalpana >=== > > >>From: "Kalpana Ramamurthy" >>To: kal_pana@hotmail.com, gdb@sourceware.org >>Subject: gdb 6.4 not allowing me to change the value of registers like >>$SP,$RBP and $RIP. >>Date: Wed, 02 May 2007 14:10:04 +0000 >> >>I have a core dump whose registers look like this when I say "info reg" >>when I give this command in gdb 6.4. >> >>(gdb) info reg >>rax 0x0 0 >>rbx 0x9c960a98 2627078808 >>rcx 0x2 2 >>rdx 0x0 0 >>rsi 0x4e1 1249 >>rdi 0xfee00300 4276093696 >>rbp 0x9c960a88 0x9c960a88 >>rsp 0x9c960a50 0x9c960a50 >>r8 0x1 1 >>r9 0x3 3 >>r10 0x0 0 >>r11 0x216 534 >>r12 0x9c960be8 2627079144 >>r13 0x3 3 >>r14 0x1 1 >>r15 0x0 0 >>rip 0x16489d 0x16489d >>eflags 0x46 70 >>cs 0x8 8 >>ss 0x0 0 >>ds 0x0 0 >>es 0x0 0 >>fs 0x0 0 >>---Type to continue, or q to quit--- >>gs 0x0 0 >> >>I want to change the value of $rsp from 0x9c960a50 to 0x6d04ee0. But gdb >>is not allowing me >>to do that. When I say >>(gdb) set $sp=0x6d04ee0 >>or if I say >>(gdb) set $rsp=0x6d04ee0 >>gdb just refuses to change the values and $sp ($rsp) stays on as >>0x9c960a50. >> >>I am using gdb 6.4. When I do the same thing as above using gdb 6.0, it >>works great. I am able >>to change the values of the registers. Why does this happen only in gdb >>6.4 ? I am not able to write macros because of this problem. Please help - >>where am I going wrong ? I have been debugging gdb 6.4 source code for 3 >>whole days now and its driving me nuts. I could see the registers in the >>regcache - and SP shows the new value. From the regcache onwards >>I have no idea how gdb translates the contents of the register cache to >>permanent values >>where the globals like$rsp etc get set permanently unless we change it >>back again. >> >>Any help will be really appreciated. >> >>Kalpana >>==== >> >>_________________________________________________________________ >>Sign in and get updated on all the action from Formula One >>http://content.msn.co.in/Sports/FormulaOne/Default >> > >_________________________________________________________________ >Voice your questions and our experts will answer them >http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm > _________________________________________________________________ Voice your questions and our experts will answer them http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm