public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Re: frysk-core/frysk proc/BankRegister.java proc/C ...
       [not found] <20071009194630.3523.qmail@sourceware.org>
@ 2007-10-09 20:05 ` Phil Muldoon
  2007-10-10  3:51   ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Muldoon @ 2007-10-09 20:05 UTC (permalink / raw)
  To: frysk

Andrew,

I know this work is ongoing, so should I sit tight regarding the FIXME 
notifications? I'm not sure how to fix the gpr registers access. If it 
is work ongoing, I'll just wait until you give the signal with an 
explanation regarding how a Task accesses it's own registers.

Regards

Phil


cagney@sourceware.org wrote:
> CVSROOT:	/cvs/frysk
> Module name:	frysk-core
> Changes by:	cagney@sourceware.org	2007-10-09 19:46:30
>
> Modified files:
> 	frysk/proc     : BankRegister.java ChangeLog 
> 	                 IndirectBankRegisterMap.java Task.java 
> 	frysk/util     : ChangeLog LinuxElfCorefilePPC32.java 
> 	                 LinuxElfCorefilePPC64.java 
> 	                 LinuxElfCorefilex86.java 
> 	                 LinuxElfCorefilex8664.java 
> Removed files:
> 	frysk/proc     : ByteOrder.java 
>
> Log message:
> 	Index: frysk-core/frysk/proc/ChangeLog
> 	2007-10-09  Andrew Cagney  <cagney@redhat.com>
> 	
> 	* BankRegister.java (getBigInteger(Task)): Delete.
> 	* Task.java (getBigIntegerRegisterFIXME(String)): New.
> 	* ByteOrder.java: Delete.
> 	* IndirectBankRegisterMap.java (add(String,long)): Delete nexted
> 	class method getBigInteger.
> 	
> 	Index: frysk-core/frysk/util/ChangeLog
> 	2007-10-09  Andrew Cagney  <cagney@redhat.com>
> 	
> 	* LinuxElfCorefilePPC32.java: Update; replace BankRegister
> 	.getBigInteger(Task) with Task. .getBigIntegerRegisterFIXME.
> 	* LinuxElfCorefilePPC64.java: Ditto.
> 	* LinuxElfCorefilex8664.java: Ditto.
> 	* LinuxElfCorefilex86.java: Ditto.
>
> Patches:
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/BankRegister.java.diff?cvsroot=frysk&r1=1.5&r2=1.6
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/ChangeLog.diff?cvsroot=frysk&r1=1.825&r2=1.826
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/IndirectBankRegisterMap.java.diff?cvsroot=frysk&r1=1.3&r2=1.4
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/Task.java.diff?cvsroot=frysk&r1=1.147&r2=1.148
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/ByteOrder.java.diff?cvsroot=frysk&r1=1.2&r2=NONE
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/ChangeLog.diff?cvsroot=frysk&r1=1.188&r2=1.189
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilePPC32.java.diff?cvsroot=frysk&r1=1.4&r2=1.5
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilePPC64.java.diff?cvsroot=frysk&r1=1.4&r2=1.5
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilex86.java.diff?cvsroot=frysk&r1=1.3&r2=1.4
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilex8664.java.diff?cvsroot=frysk&r1=1.3&r2=1.4
>
>   

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

* Re: frysk-core/frysk proc/BankRegister.java proc/C ...
  2007-10-09 20:05 ` frysk-core/frysk proc/BankRegister.java proc/C Phil Muldoon
@ 2007-10-10  3:51   ` Andrew Cagney
  2007-10-10  6:49     ` Phil Muldoon
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2007-10-10  3:51 UTC (permalink / raw)
  To: Phil Muldoon; +Cc: frysk

Phil Muldoon wrote:
> Andrew,
>
> I know this work is ongoing, so should I sit tight regarding the FIXME 
> notifications? I'm not sure how to fix the gpr registers access. If it 
> is work ongoing, I'll just wait until you give the signal with an 
> explanation regarding how a Task accesses it's own registers.
>
The function to look at is Task.accessRegister(Register register,int 
offset, int length, byte[] buffer, int start, boolean write) which will 
does a direct/raw byte copy of the data into a buffer.

However, yes, perhaps hold off a little until I've got all the register 
code in frysk.proc resolved. 

Andrew

> Regards
>
> Phil
>
>
> cagney@sourceware.org wrote:
>> CVSROOT:    /cvs/frysk
>> Module name:    frysk-core
>> Changes by:    cagney@sourceware.org    2007-10-09 19:46:30
>>
>> Modified files:
>>     frysk/proc     : BankRegister.java ChangeLog                      
>> IndirectBankRegisterMap.java Task.java     frysk/util     : ChangeLog 
>> LinuxElfCorefilePPC32.java                      
>> LinuxElfCorefilePPC64.java                      
>> LinuxElfCorefilex86.java                      
>> LinuxElfCorefilex8664.java Removed files:
>>     frysk/proc     : ByteOrder.java
>> Log message:
>>     Index: frysk-core/frysk/proc/ChangeLog
>>     2007-10-09  Andrew Cagney  <cagney@redhat.com>
>>     
>>     * BankRegister.java (getBigInteger(Task)): Delete.
>>     * Task.java (getBigIntegerRegisterFIXME(String)): New.
>>     * ByteOrder.java: Delete.
>>     * IndirectBankRegisterMap.java (add(String,long)): Delete nexted
>>     class method getBigInteger.
>>     
>>     Index: frysk-core/frysk/util/ChangeLog
>>     2007-10-09  Andrew Cagney  <cagney@redhat.com>
>>     
>>     * LinuxElfCorefilePPC32.java: Update; replace BankRegister
>>     .getBigInteger(Task) with Task. .getBigIntegerRegisterFIXME.
>>     * LinuxElfCorefilePPC64.java: Ditto.
>>     * LinuxElfCorefilex8664.java: Ditto.
>>     * LinuxElfCorefilex86.java: Ditto.
>>
>> Patches:
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/BankRegister.java.diff?cvsroot=frysk&r1=1.5&r2=1.6 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/ChangeLog.diff?cvsroot=frysk&r1=1.825&r2=1.826 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/IndirectBankRegisterMap.java.diff?cvsroot=frysk&r1=1.3&r2=1.4 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/Task.java.diff?cvsroot=frysk&r1=1.147&r2=1.148 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/ByteOrder.java.diff?cvsroot=frysk&r1=1.2&r2=NONE 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/ChangeLog.diff?cvsroot=frysk&r1=1.188&r2=1.189 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilePPC32.java.diff?cvsroot=frysk&r1=1.4&r2=1.5 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilePPC64.java.diff?cvsroot=frysk&r1=1.4&r2=1.5 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilex86.java.diff?cvsroot=frysk&r1=1.3&r2=1.4 
>>
>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/util/LinuxElfCorefilex8664.java.diff?cvsroot=frysk&r1=1.3&r2=1.4 
>>
>>
>>   
>

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

* Re: frysk-core/frysk proc/BankRegister.java proc/C ...
  2007-10-10  3:51   ` Andrew Cagney
@ 2007-10-10  6:49     ` Phil Muldoon
  2007-10-10 13:36       ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Muldoon @ 2007-10-10  6:49 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: frysk

Andrew Cagney wrote:
> Phil Muldoon wrote:
>> Andrew,
>>
>> I know this work is ongoing, so should I sit tight regarding the 
>> FIXME notifications? I'm not sure how to fix the gpr registers 
>> access. If it is work ongoing, I'll just wait until you give the 
>> signal with an explanation regarding how a Task accesses it's own 
>> registers.
>>
> The function to look at is Task.accessRegister(Register register,int 
> offset, int length, byte[] buffer, int start, boolean write) which 
> will does a direct/raw byte copy of the data into a buffer.
>
> However, yes, perhaps hold off a little until I've got all the 
> register code in frysk.proc resolved.
> Andrew
>

Ok will do, will wait and see. As a rhetorical question, what is wrong 
with task.getSomeRegisterFunctionName("eax") as a general helper 
function? Why do I need to know (ptrace buffer?) offset and length to 
access a register? Is this because register access is being move to the 
task from the ISA? Just trying to get a sense of where this refactor is 
going.

Regards

Phil

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

* Re: frysk-core/frysk proc/BankRegister.java proc/C ...
  2007-10-10  6:49     ` Phil Muldoon
@ 2007-10-10 13:36       ` Andrew Cagney
  2007-10-10 13:49         ` Phil Muldoon
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2007-10-10 13:36 UTC (permalink / raw)
  To: Phil Muldoon; +Cc: frysk

Phil Muldoon wrote:
> Andrew Cagney wrote:
>> Phil Muldoon wrote:
>>> Andrew,
>>>
>>> I know this work is ongoing, so should I sit tight regarding the 
>>> FIXME notifications? I'm not sure how to fix the gpr registers 
>>> access. If it is work ongoing, I'll just wait until you give the 
>>> signal with an explanation regarding how a Task accesses it's own 
>>> registers.
>>>
>> The function to look at is Task.accessRegister(Register register,int 
>> offset, int length, byte[] buffer, int start, boolean write) which 
>> will does a direct/raw byte copy of the data into a buffer.
>>
>> However, yes, perhaps hold off a little until I've got all the 
>> register code in frysk.proc resolved.
>> Andrew
>>
>
> Ok will do, will wait and see. As a rhetorical question, what is wrong 
> with task.getSomeRegisterFunctionName("eax") as a general helper function?

The only place where a String->Register lookup (e.g., "eax" -> 
frysk.isa.IA32Registers.EAX) is needed is in the expression evaluator 
where it interprets << $eax >>.  Every where else constant object, such 
as frysk.isa.IA32Registers.EAX can be used: these objects are efficient 
(better with HashMap) and second having defined constants prevents typos 
such as a register being called "foo" in one place and "fos" in a second.

> Why do I need to know (ptrace buffer?) offset and length to access a 
> register? Is this because register access is being move to the task 
> from the ISA? Just trying to get a sense of where this refactor is going.
>

I'm not sure what you mean, the offset/length are for within the 
specified register, and start is an offset into the byte buffer.  Two 
things change: tThe code that implements register accesses isn't being 
moved to the task; but the way to access registers is now simpler, contrast:
    Task.getRegister(IA32Register.XIP)
with:
    Task.getIsa().getBankRegister("xip").getRegister(task)
the internals, though cleaned up will still be very similar.

Andrew


> Regards
>
> Phil
>

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

* Re: frysk-core/frysk proc/BankRegister.java proc/C ...
  2007-10-10 13:36       ` Andrew Cagney
@ 2007-10-10 13:49         ` Phil Muldoon
  0 siblings, 0 replies; 5+ messages in thread
From: Phil Muldoon @ 2007-10-10 13:49 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: frysk

Andrew Cagney wrote:
> I'm not sure what you mean, the offset/length are for within the 
> specified register, and start is an offset into the byte buffer.  Two 
> things change: tThe code that implements register accesses isn't being 
> moved to the task; but the way to access registers is now simpler, 
> contrast:
>    Task.getRegister(IA32Register.XIP)
> with:
>    Task.getIsa().getBankRegister("xip").getRegister(task)
> the internals, though cleaned up will still be very similar.
>
Ok that makes much more sense. Thanks. The other api threw me, but if 
this is the eventual user facing api, that will be great.

Regards

Phil

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

end of thread, other threads:[~2007-10-10 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20071009194630.3523.qmail@sourceware.org>
2007-10-09 20:05 ` frysk-core/frysk proc/BankRegister.java proc/C Phil Muldoon
2007-10-10  3:51   ` Andrew Cagney
2007-10-10  6:49     ` Phil Muldoon
2007-10-10 13:36       ` Andrew Cagney
2007-10-10 13:49         ` Phil Muldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).