This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Save CS segment register for ljmp instruction


On Mon, Oct 12, 2009 at 3:54 PM, Hui Zhu <teawater@gmail.com> wrote:
> Could you post some code to test the ljmp and cs? ?I am not sure about cs part.

I'm sorry, but I've no idea of writing code to test them. Could someone help me?

Thanks!

Jiang

> Thanks,
> Hui
>
> On Mon, Oct 12, 2009 at 10:24, Jiang Jilin <freephp@gmail.com> wrote:
>> Hi Hui,
>>
>> I think CS register should be stored for ljmp instruction, but I'm
>> not pretty sure, please help me confirm it.
>>
>> Thanks!
>>
>> 2009-10-12 ?Jiang Jilin ?<freephp@gmail.com>
>>
>> ? ? ? ?* i386-tdep.c (i386_process_record): Save CS segment register
>> ? ? ? ?for ljmp instruction
>> ---
>> ?gdb/i386-tdep.c | ? ?3 +++
>> ?1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
>> index b4dc646..0145008 100644
>> --- a/gdb/i386-tdep.c
>> +++ b/gdb/i386-tdep.c
>> @@ -3606,8 +3606,11 @@ reswitch:
>> ? ? ? ? ?break;
>> ? ? ? ? ?/* jmp */
>> ? ? ? ?case 4:
>> + ? ? ? ? I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
>> + ? ? ? ? break;
>> ? ? ? ? ?/* ljmp */
>> ? ? ? ?case 5:
>> + ? ? ? ? I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_CS_REGNUM);
>> ? ? ? ? ?I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
>> ? ? ? ? ?break;
>> ? ? ? ? ?/* push */
>> --
>> 1.5.4.3
>>
>>
>



-- 
Jiang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]