Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: Virtual Machine and GDB
@ 2006-08-22  6:26 Anupama Chandwani
  0 siblings, 0 replies; 40+ messages in thread
From: Anupama Chandwani @ 2006-08-22  6:26 UTC (permalink / raw)
  To: Michael.Snyder, cjia; +Cc: gdb


Hi..

>> 2) You need to teach gdb to understand the architecture of
>>your virtual machine -- the word size, the instruction language,
>> the register set, and so forth.  That doesn't mean porting gdb
>> to RUN on the VM -- it just means teaching gdb how to DEBUG
>> the VM (meaning, debug something that is running in the VM).
>>
>
>How can I achieve this part? At the moment, after received a packet
>from remote GDB, I am trying to parse the packet first, and then send
>the right response to GDB. For example,  if VM received a "info
>registers" command at the debug socket, it will try to collect
>register information, and then generate a right RSP message back.  Or,
>if it received "next", I can set a flag in VM to indicate to only
>execute one instruction. Is that a right way to do?

>>Qian


Since you already have a communicating mechanism up, its good, u wont take much
time for including ur target in gdb. Your on right track, but after parsing wat
the packet wants just call the callback functions in gdb. Instead of setting a
flag in VM to indicate the next command, just call the function of "next" in gdb.
It will take care of the required.
       Read how targets are supported by gdb, ull get a gud view of exactly wat u
have to implement.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* Virtual Machine and GDB
@ 2006-08-20 21:10 Cai Qian
  2006-08-21  0:07 ` Daniel Jacobowitz
  0 siblings, 1 reply; 40+ messages in thread
From: Cai Qian @ 2006-08-20 21:10 UTC (permalink / raw)
  To: gdb

Hi,

How can I communicate a virtual machine (like Java virtual machine)
with the host, If I want to use GDB serial protocol? The target
backend has been developed for the virtual machine, so simple C code
can be complied and run. In addition, I have written a remote stub for
the target.

Qian


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2006-08-22  6:26 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-22  6:26 Virtual Machine and GDB Anupama Chandwani
  -- strict thread matches above, loose matches on Subject: below --
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-22  6:26 Anupama Chandwani
2006-08-20 21:10 Cai Qian
2006-08-21  0:07 ` Daniel Jacobowitz
2006-08-21  0:24   ` Cai Qian
2006-08-21  1:54     ` Daniel Jacobowitz
     [not found]     ` <daef60380608201849o49825a32s135b8131807ee71f@mail.gmail.com>
2006-08-21 10:25       ` Cai Qian
2006-08-21 11:38         ` teawater
2006-08-21 12:22           ` Cai Qian
2006-08-21 12:48             ` Daniel Jacobowitz
2006-08-21 13:35             ` teawater
2006-08-21 17:04             ` Neo
2006-08-21 17:59               ` Cai Qian
2006-08-21 18:28                 ` Michael Snyder
2006-08-21 18:32                   ` Daniel Jacobowitz
2006-08-21 18:50                   ` Cai Qian
2006-08-21 19:13                     ` Michael Snyder
2006-08-21 18:30                 ` Neo
2006-08-21 18:57                   ` Cai Qian
2006-08-21 19:16                     ` Michael Snyder
2006-08-22  1:21                     ` teawater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox