* build_regcache
@ 2002-03-14 17:42 Martin M. Hunt
2002-03-14 19:04 ` build_regcache Andrew Cagney
2002-03-18 18:55 ` build_regcache Michael Snyder
0 siblings, 2 replies; 4+ messages in thread
From: Martin M. Hunt @ 2002-03-14 17:42 UTC (permalink / raw)
To: gdb
Am I misunderstanding something or does it not make sense that the register
cache is initialized before any architectures? Would moving it to the end of
COMMON_OBS be an OK solution?
--
Martin Hunt
GDB Engineer
Red Hat, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: build_regcache
2002-03-14 17:42 build_regcache Martin M. Hunt
@ 2002-03-14 19:04 ` Andrew Cagney
2002-03-14 19:41 ` build_regcache Martin M. Hunt
2002-03-18 18:55 ` build_regcache Michael Snyder
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-03-14 19:04 UTC (permalink / raw)
To: Martin M. Hunt; +Cc: gdb
> Am I misunderstanding something or does it not make sense that the register
> cache is initialized before any architectures? Would moving it to the end of
> COMMON_OBS be an OK solution?
It has worked up until now. Do you have any more info?
I do recall that the mixture of pseudo-registers and the wrong
combination of multi-arch and non-multi-arch register macros can be
fatal.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: build_regcache
2002-03-14 19:04 ` build_regcache Andrew Cagney
@ 2002-03-14 19:41 ` Martin M. Hunt
0 siblings, 0 replies; 4+ messages in thread
From: Martin M. Hunt @ 2002-03-14 19:41 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
On Thursday 14 March 2002 07:04 pm, Andrew Cagney wrote:
> > Am I misunderstanding something or does it not make sense that the
> > register cache is initialized before any architectures? Would moving it
> > to the end of COMMON_OBS be an OK solution?
>
> It has worked up until now. Do you have any more info?
My situation is very complicated. I'll try to summarize in general what I
see happening.
build_regcache() runs through all the registers calling REGISTER_RAW_SIZE().
This normally calls generic_register_raw_size() because we don't have an arch
registered yet. build_regcache() then allocates enough memory to handle all
the generic registers it has seen and initializes the memory to zero.
In my case, REGISTER_RAW_SIZE is defined to call
TYPE_LENGTH(REGISTER_VIRTUAL_SIZE(n)) and REGISTER_VIRTUAL_SIZE returns
something like builtin_type_int, which is still uninitialized because
_initialize_gdbtypes() has not been called yet.
I haven't checked what happens if the allocated memory for the registers is
too small for the actual register set. Maybe it gets reallocated when the
architecture changes.
> I do recall that the mixture of pseudo-registers and the wrong
> combination of multi-arch and non-multi-arch register macros can be
> fatal.
That would be one way to explain what I'm dealing with.
--
Martin Hunt
GDB Engineer
Red Hat, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: build_regcache
2002-03-14 17:42 build_regcache Martin M. Hunt
2002-03-14 19:04 ` build_regcache Andrew Cagney
@ 2002-03-18 18:55 ` Michael Snyder
1 sibling, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2002-03-18 18:55 UTC (permalink / raw)
To: Martin M. Hunt; +Cc: gdb
"Martin M. Hunt" wrote:
>
> Am I misunderstanding something or does it not make sense that the register
> cache is initialized before any architectures? Would moving it to the end of
> COMMON_OBS be an OK solution?
I think that order of execution of initialize routines cannot be
guaranteed.
Therefore they need to be order independent.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-03-19 2:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-14 17:42 build_regcache Martin M. Hunt
2002-03-14 19:04 ` build_regcache Andrew Cagney
2002-03-14 19:41 ` build_regcache Martin M. Hunt
2002-03-18 18:55 ` build_regcache Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox