Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > U

uwx_get_source_info(3X)

Integrity Systems Only
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

uwx_get_source_info() — return source information for current frame

SYNOPSIS

#include <uwx.h> int uwx_get_source_info( struct uwx_env *env, char **ifuncp, char **srcfilep, int *linenump, int *inline_contextp );

DESCRIPTION

uwx_get_source_info() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_get_source_info() obtains source file and line number information for the current frame from the symbolic information stored in the ELF object file, if available.

This entry point is provided for use immediately following a call to uwx_step() or uwx_step_inline(). For other situations, see uwx_find_source_info(3X).

Parameters

env

A pointer to an unwind environment object.

ifuncp

Pointer to a variable of type char * where the inlined function name will be returned. If NULL, the inlined function name will not be returned. If the IP (instruction pointer) of the current context is not in an inlined call or if symbolic debug information is not available, a NULL pointer will be returned.

srcfilep

Pointer to a variable of type char * where the source file name will be returned. If NULL, the source file name will not be returned. If symbolic debug information is not available, a NULL pointer will be returned.

linenump

Pointer to a variable of type int where the source line number will be returned. If NULL, the source line number will not be returned. If symbolic debug information is not available, 0 will be returned.

inline_contextp

Pointer to a variable of type int where the inline context identifier will be returned. If NULL, the inline context identifier will not be returned. If the IP of the current context is not in an inlined call or if symbolic debug information is not available, 0 will be returned.

In all cases where a pointer to a string is returned, the string is allocated within the unwind environment, and the pointer is valid only until the next call to either uwx_step() or uwx_free().

Stepping through inlined calls

If uwx_get_source_info() returns a non-zero inline context identifier, it indicates that the IP is located within an inline call. If the application wishes to step through the chain of inlined calls, it can find the name of the inlined function through the ifuncp pointer, then call uwx_step_inline() to move one step up the chain of inlined calls. The application may then call uwx_get_source_info() again to obtain the updated information. This process should be repeated until the returned identifier is 0.

RETURN VALUE

uwx_get_source_info() returns UWX_OK on success. See uwx(3X) for error codes.

AUTHOR

The Unwind Express Library was developed by Hewlett-Packard.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.