| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When trying to refer a module data structure GET_DIE_NFIELDS
does not set the dwarf_info to the right module.
For instance:
struct ap_device {
...
struct list_head list;
...
};
struct ap_device *dev;
As a result, it was able to resolve only dev->list and it was failing to
resolve dev->list.next.
The patch takes care of handling this by introducing GET_DIE_NFIELDS_ALL
which takes care of setting the dwarf_info to the appropriate module.
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
makedumpfile/eppic was not able to resolve member of the
structure in cases such as:
struct abc
{
...
...
struct xyz
...
}
and eppic script:
sample()
{
struct abc *a;
struct xyz *x;
x->member;
}
would fail to resolve "member" of structure xyz. However
it works if "struct abc *a;" line is removed from eppic
script. This patch fixes this issue.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Current version of makedumpfile/eppic integration patches works only for
data structures in vmlinux. This patch adds support to module data structures.
Changes from v1:
Fix return value when failed to set dwarf_debuginfo
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The init_dwarf_info() function initializes "dwarf_info.dwfl" handle everytime
when it is called. The "dwarf_info.dwfl" handle should be freed once we are
done with searching of desired debuginfo and before next invocation of
init_dwarf_info().
Most of the functions (e.g get_debug_info()) that invokes init_dwarf_info()
also invokes clean_dwfl_info() to free dwfl handle. But the function
get_die_from_offset() that invokes init_dwarf_info(), does not free the dwfl
handle and hence it keeps re-reading debuginfo ELF section into memory every
time it is invoked until it starts failing with following errors:
init_dwarf_info: Can't get first elf header of /usr/lib/debug/boot/vmlinux-x.x.x
get_die_attr_type: Can't find the DIE.
init_dwarf_info: Can't get first elf header of /usr/lib/debug/boot/vmlinux-x.x.x
init_dwarf_info: Can't get first elf header of /usr/lib/debug/boot/vmlinux-x.x.x
File eppic_macro/key.c, line 32, Error: Oops! Var ref1.[keyring_name_hash]
This patch makes sure that clean_dwfl_info() is called once we are done with
the debuginfo search.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current version of makedumpfile/eppic integration patches
works only for symbols in vmlinux. This patch adds support
to module symbols.
I have tested the patch on dynamically linked version of
makedumpfile with EPPIC_LEGACY_MODE=1. However it should
work on non-legacy mode also.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For programs compiled with -static option, there is no
dynamic section in the ELF file. Hence, the functions in the
main executable cannot be invoked by dynamically loaded
libraries as they cannot be resolved.
The eppic extension for makedumpfile, which is dynamically
loaded when -eppic flag is specified, needs to call few
functions in makedumpfile. This will not work if makedumpfile
is compiled with -static flag.
This patch is a hack which overcomes this limitation by passing
the address of the functions required by the dynamically loaded
library, eppic_makedumpfile.so, during initialization. The
dynamically loaded library branches to the function address
eliminating the need to resolve functions.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eppic enables access to symbols in two ways. The first, is a more
natural mode in that it makes symbols available as fully typed
entities. The second, is generic and treats all symbols as an address
to data which then needs to be cast to the proper type explicitly. The
former obviously enables an easier cut & pasting of target code into
eppic code.
Currently generic symbol access mode is supported. This patch extends
the functionality to include support for fully typed symbol access mode
(which will be the default mode) in eppic macros. User can switch to
generic symbol access mode by setting the following environmental
variable - EPPIC_LEGACY_MODE. libeppic.a will take care of handling
EPPIC_LEGACY_MODE. libeppic.a will pass NULL to VALUE_S* argument of
apigetval() call back function if EPPIC_LEGACY_MODE is set.
Refer to http://code.google.com/p/eppic/ for more information.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The memset function will be used to specify the virtual address
and the length of the data to be scrubbed in the dump file from
the eppic macro. makedumpfile will convert these requests into
filter_info nodes which will be enqueued for filtering. Existing
makedumpfile functionality reads the filter_info nodes and scrubs the
data accordingly.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch includes functionality for apimember and apigetrtype eppic
callback routines along with helper functions to fetch information
related to the member of the structure/union
Whenever a structure/union member is accessed inside the eppic macro,
eppic will query makedumpfile through call back functions requesting
more information on the structure or union member. The information
includes member name, offset from structure, data type and size.
makedumpfile will get all these information using DWARF and pass
back to eppic using libeppic API calls.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
libeppic will call apigetctype call back function whenever it
encounters a token in the eppic macro. The call back function will use
DWARF to query information related to the requested token and will
pass it back to eppic using libeppic API calls. If the token does not
exist, then apigetctype call returns 0.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements a series of apigetuint* call back functions
which are used to access data from the dump image. Eppic uses these
call back functions to fetch the actual value of the global variables.
This patch also adds other call back functions as a place holder which
will be implemented in later patches. This is mainly to avoid
compilation error while registering the call back functions using
eppic_apiset() function.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|
|
This patch contains routines which initialize eppic and register call
back function which will be called whenever a new eppic macro is loaded
using eppic_load() API. The registered call back function executes the
eppic macro as soon as it is loaded.
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
|