[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB Stubs for PowerPC BSP with old-exceptions



Robert S. Grimes wrote:
> Till Straumann wrote:
>> Robert S. Grimes wrote:
>>> Hi Till,
>>>
>>> I want to use your gdb stubs and (eventually) cexp, but I'm using a new
>>> BSP for the Virtex-4 PowerPC.  This BSP is based on the gen405, which
>>> (still) uses the "old exceptions" model.  Sure enough, your agent won't
>>> compile for my BSP.  So, what would be involved in making it work with
>>> "old exceptions"?  Or should I instead change the BSP to "new 
>>> exceptions"?
>>>
>>>   
>> I think the latter way is the way to go. Hopefully some day
>> there will be a single model (again). I'm not sure the 'new'
>> model is necessarily better (I'm not familiar with the 'old' one)
>> but it is a hassle to have two. I don't have the time to
>> implement support for the old model ATM (and I'm not
>> eager to maintain two models), sorry.
>>
>> Regards
>> -- Till
> Hi Till,
>
> Thanks for the response.  Perhaps you misunderstood me, but I 
> certainly wasn't expecting you to support an old standard!  I was 
> envisioning me doing the work, either way...Anyway, Joel has suggested 
> I do the same, for similar reasons.  Given that I've always felt the 
> new model would be better, it seems I've enough good reasons for 
> changing what already works.  Only problem is that I don't have any 
> information about the differences between old and new.
> Do you or anyone else know where I should look?
Dunno other than in the obvious places (relevant new/old source directories)
and in a BSP that uses 'new'.

Ideally, you can just use code from the 'vectors' subdirectory of the
'powerpc/shared' directory (look at the 'psim' BSP). This works
for the 60x/750/74xx CPUs. I don't know if you would need modifications
for the 405 - I'm not familiar with that one.

In any case *do not* copy from powerpc/shared/vectors and create
a modified version in your 'vectors' subdirectory. This has been very
bad practice in the past and lead to a bunch of hard to maintain
variants of code. Due to the low-level nature of exception handling
there has to be assembly code. We don't want a jungle of variants
of this code. Don't do it. Please.

If you have to deviate from the 'shared' implementation then think
about adding run-time tests or (if you have to) compile-time conditionals
(#ifdef) to the 'shared' implementation so that only a single
implementation needs to be maintained.

Your Makefile then uses the code from the 'shared' area (ugly, I know;
there should really be a library)

HTH
-- Till
> Or at the very least, suggest one or two good example PowerPC BSPs 
> that implement the new exception model?
>
> Thanks!
> -Bob