This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: arm core analysis on x86 host
On Monday 28 March 2005 18:57, Daniel Jacobowitz wrote:
> On Mon, Mar 28, 2005 at 06:29:19PM -0500, Jon Ringle wrote:
> > I find that the only place that core_stratum gets used to set to_stratum
> > is in init_core_ops(), which gets called by _initialize_corelow().
> > However, I can't find any code that calls _initialize_corelow().
>
> It's called from init.c, which is a generated file, if it is included in
> the gdb build. See the .mh and .mt files.
Ok. I added corelow.o to gdb/config/arm/linux.mt and now _initialize_corelow()
is being called.
> > On Monday 28 March 2005 18:57, Daniel Jacobowitz wrote:
> > > Take a look at any target which registers core functions in a tdep
> > > file, instead of a nat file. arm-linux still does it in the nat file.
> > > That just needs to be fixed.
> >
> > I looked at mips-linux-tdep.c as an example and it uses:
> > deprecated_add_core_fns (®set_core_fns);
> >
> > Is there a non-deprecated version I should be use instead? Is there a
> > better example to follow?
> Try anything using set_gdbarch_regset_from_core_section.
I am now using as an example ppc-linux-tdep.c, however it still seems that a
call to deprecated_add_core_fns() is needed. When I use a 'target
core /path/to/core' command, core_open() gets called which calls
sniff_core_bfd(). sniff_core_bfd() has a loop to iterate over core_file_fns,
which as far as I can tell gets populated via deprecated_add_core_fns(). I
don't see how else core_file_fns gets populated. Am I misunderstanding the
use of 'deprecated' here? My understanding of the word is that use is no
longer desired in favor of a (hopefully) better solution or archetecture.
Jon