FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 09-06-2012, 10:49 AM
Sebastian Ott
 
Default resolve symbols: sial.so vs eppic.so

The way symbols are resolved in sial scripts is different between
sial.so and eppic.so. A symbol resolves to the address of the
symbol using sial.so and to the memory content using eppic.so.

In crash 6.0.9 I got e.g.:

crash> sym dev_kobj
979138 (b) dev_kobj
crash> rd dev_kobj
979138: 0000000174c9aac0 ....t...
crash> dev_kobj
dev_kobj = $3 = (struct kobject *) 0x174c9aac0

Using a sial script:

crash> !cat foo.sial
string foo_help() { return ""; }
string foo_opt() { return ""; }
string foo_usage() { return ""; }

int foo()
{
printf("0x%x
", dev_kobj);

return 1;
}

./eppic.so: shared object loaded
crash> load foo.sial
crash> foo
0x74c9aac0

./sial.so: shared object loaded
crash> load foo.sial
crash> foo
0x979138

Is this an intentional change or a bug?

Regards,
Sebastian

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-06-2012, 01:01 PM
"Luc Chouinard"
 
Default resolve symbols: sial.so vs eppic.so

Eppic now resolves symbols to their real typed instances directly.
No need to know and cast from symbol address anymore.
For backward compatibility, you can define environment variable

> -----Original Message-----
> From: Sebastian Ott [mailto:sebott@linux.vnet.ibm.com]
> Sent: Thursday, September 06, 2012 6:50 AM
> To: Luc Chouinard; Dave Anderson
> Cc: crash-utility@redhat.com; holzheu@linux.vnet.ibm.com
> Subject: resolve symbols: sial.so vs eppic.so
>
> The way symbols are resolved in sial scripts is different between
sial.so and
> eppic.so. A symbol resolves to the address of the symbol using sial.so
and to the
> memory content using eppic.so.
>
> In crash 6.0.9 I got e.g.:
>
> crash> sym dev_kobj
> 979138 (b) dev_kobj
> crash> rd dev_kobj
> 979138: 0000000174c9aac0 ....t...
> crash> dev_kobj
> dev_kobj = $3 = (struct kobject *) 0x174c9aac0
>
> Using a sial script:
>
> crash> !cat foo.sial
> string foo_help() { return ""; }
> string foo_opt() { return ""; }
> string foo_usage() { return ""; }
>
> int foo()
> {
> printf("0x%x
", dev_kobj);
>
> return 1;
> }
>
> ./eppic.so: shared object loaded
> crash> load foo.sial
> crash> foo
> 0x74c9aac0
>
> ./sial.so: shared object loaded
> crash> load foo.sial
> crash> foo
> 0x979138
>
> Is this an intentional change or a bug?
>
> Regards,
> Sebastian


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-06-2012, 01:05 PM
"Luc Chouinard"
 
Default resolve symbols: sial.so vs eppic.so

Pulled trigger too quick.
Here's the variable you should set.

export EPPIC_LEGACY_MODE=1

If a more granular way of switching from old to new mode is needed, we
should discuss it.

-Luc

> -----Original Message-----
> From: Luc Chouinard
> Sent: Thursday, September 06, 2012 9:01 AM
> To: 'Sebastian Ott'; Dave Anderson
> Cc: crash-utility@redhat.com; holzheu@linux.vnet.ibm.com
> Subject: RE: resolve symbols: sial.so vs eppic.so
>
> Eppic now resolves symbols to their real typed instances directly.
> No need to know and cast from symbol address anymore.
> For backward compatibility, you can define environment variable
>
> > -----Original Message-----
> > From: Sebastian Ott [mailto:sebott@linux.vnet.ibm.com]
> > Sent: Thursday, September 06, 2012 6:50 AM
> > To: Luc Chouinard; Dave Anderson
> > Cc: crash-utility@redhat.com; holzheu@linux.vnet.ibm.com
> > Subject: resolve symbols: sial.so vs eppic.so
> >
> > The way symbols are resolved in sial scripts is different between
> > sial.so and eppic.so. A symbol resolves to the address of the symbol
> > using sial.so and to the memory content using eppic.so.
> >
> > In crash 6.0.9 I got e.g.:
> >
> > crash> sym dev_kobj
> > 979138 (b) dev_kobj
> > crash> rd dev_kobj
> > 979138: 0000000174c9aac0 ....t...
> > crash> dev_kobj
> > dev_kobj = $3 = (struct kobject *) 0x174c9aac0
> >
> > Using a sial script:
> >
> > crash> !cat foo.sial
> > string foo_help() { return ""; }
> > string foo_opt() { return ""; }
> > string foo_usage() { return ""; }
> >
> > int foo()
> > {
> > printf("0x%x
", dev_kobj);
> >
> > return 1;
> > }
> >
> > ./eppic.so: shared object loaded
> > crash> load foo.sial
> > crash> foo
> > 0x74c9aac0
> >
> > ./sial.so: shared object loaded
> > crash> load foo.sial
> > crash> foo
> > 0x979138
> >
> > Is this an intentional change or a bug?
> >
> > Regards,
> > Sebastian


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-06-2012, 01:56 PM
Sebastian Ott
 
Default resolve symbols: sial.so vs eppic.so

On Thu, 6 Sep 2012, Luc Chouinard wrote:
> Pulled trigger too quick.
> Here's the variable you should set.
>
> export EPPIC_LEGACY_MODE=1
>

Ok thanks. In addition to that I just found out that one can use
"#ifdef eppic" inside scripts.

Regards,
Sebastian

> If a more granular way of switching from old to new mode is needed, we
> should discuss it.
>
> -Luc
>
> > -----Original Message-----
> > From: Luc Chouinard
> > Sent: Thursday, September 06, 2012 9:01 AM
> > To: 'Sebastian Ott'; Dave Anderson
> > Cc: crash-utility@redhat.com; holzheu@linux.vnet.ibm.com
> > Subject: RE: resolve symbols: sial.so vs eppic.so
> >
> > Eppic now resolves symbols to their real typed instances directly.
> > No need to know and cast from symbol address anymore.
> > For backward compatibility, you can define environment variable
> >
> > > -----Original Message-----
> > > From: Sebastian Ott [mailto:sebott@linux.vnet.ibm.com]
> > > Sent: Thursday, September 06, 2012 6:50 AM
> > > To: Luc Chouinard; Dave Anderson
> > > Cc: crash-utility@redhat.com; holzheu@linux.vnet.ibm.com
> > > Subject: resolve symbols: sial.so vs eppic.so
> > >
> > > The way symbols are resolved in sial scripts is different between
> > > sial.so and eppic.so. A symbol resolves to the address of the symbol
> > > using sial.so and to the memory content using eppic.so.
> > >
> > > In crash 6.0.9 I got e.g.:
> > >
> > > crash> sym dev_kobj
> > > 979138 (b) dev_kobj
> > > crash> rd dev_kobj
> > > 979138: 0000000174c9aac0 ....t...
> > > crash> dev_kobj
> > > dev_kobj = $3 = (struct kobject *) 0x174c9aac0
> > >
> > > Using a sial script:
> > >
> > > crash> !cat foo.sial
> > > string foo_help() { return ""; }
> > > string foo_opt() { return ""; }
> > > string foo_usage() { return ""; }
> > >
> > > int foo()
> > > {
> > > printf("0x%x
", dev_kobj);
> > >
> > > return 1;
> > > }
> > >
> > > ./eppic.so: shared object loaded
> > > crash> load foo.sial
> > > crash> foo
> > > 0x74c9aac0
> > >
> > > ./sial.so: shared object loaded
> > > crash> load foo.sial
> > > crash> foo
> > > 0x979138
> > >
> > > Is this an intentional change or a bug?
> > >
> > > Regards,
> > > Sebastian
>
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 03:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org