Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] About working with memory in debugger

On Tue, 29 Oct 2002, Elena Zannoni wrote:

> Thomas Fletcher writes:
>  > On Tue, 29 Oct 2002, Igor S Zamjatin wrote:
>  > 
>  > >   Hi all!
>  > > 
>  > > At first I want to say that all CDT Developers do a great job and want to 
>  > > thank them a lot.
>  > > 
>  > > I want to ask when approximately we can expect some version of Memory 
>  > > View. May be prior variant is in CVS Repository already? 
>  > 
>  > It is already in CVS and if you look at the history on this list it
>  > is undergoing development right now!
>  >  
>  > > And another question is will it possible to change memory from Eclipse-CDT 
>  > > and how it will be connected with GDB/MI protocol? As I can see there is 
>  > > no any command that change memory. Some -var* commands do similar actions 
>  > > but I'm not shure that it is possible to write something directly by 
>  > > memory address using that commands.
>  > 
>  > I haven't looked at the code for the Memory View specifically
>  > but you can always do a manual set of a random memory address
>  > to a value if I remember correctly.  Something along the lines
>  > of: 
>  >  set *(int*)(0x8034565) = 12
>  > should work (I'm certain I've used this in the past though the syntax
>  > looks a little gunky).
>  > 
> 
> You should use the memory commands:
> mi_cmd_data_write_memory
> mi_cmd_data_read_memory
> 
> they are in mi-main.c (which admittedly is not the right place).  They
> haven't been extensively tested. As you find bugs/problems you can
> report them on gdb@xxxxxxxxxxxxxxxxxx and enter bugs in the gdb PR
> database at:
> http://sources.redhat.com/gdb/bugs/
> there is an MI category for the bugs.

Elena,

  Thanks for the update =;-)  I actually am not conversant in
MI, I was just indicating how as a user you could conceivably
do such a thing from the gdb command line and naturally assumed
that if there wasn't a better way to do it (which you've pointed
out) that this could be one way to try it.  

  Of course this is why having the source is so valuable ... since
you can just dive into the CDT MI layer and check out the command
which is being transmitted.

Thanks,
 Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher       QNX Software Systems
thomasf@xxxxxxx                 OS Technology Developer
(613)-591-0931                  http://www.qnx.com/



Back to the top