Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

Classes | Typedefs | Functions | Variables
Source-file:Line-number Information
Collaboration diagram for Source-file:Line-number Information:


class  libcwd::location_ct
 A source file location. More...
class  libcwd::object_file_ct
 An object representing the main executable or a shared library. More...


typedef unsigned short int libcwd::location_format_t
 The type of the argument of location_format. More...


char const * libcwd::pc_mangled_function_name (void const *addr)
 Find the mangled function name of the address addr. More...
location_format_t libcwd::location_format (location_format_t format)
 Set the output format of location_ct. More...
std::ostream & libcwd::operator<< (std::ostream &os, location_ct const &location)
 Write location to ostream os.Write the contents of a location_ct object to an ostream in the form source-file:line-number, or writes objectfile:mangledfuncname when the location is unknown. If the source-file:line-number is known, then it may be prepended by the object file and/or the mangled function name anyway if this was requested through location_format. That function can also be used to cause the source-file to be printed with its full path.


char const *const libcwd::unknown_function_c
 This constant (pointer) is returned by location_ct::mangled_function_name() when no function is known.

Detailed Description

Detailed Description

When libcwd was configured with --enable-location, then libcwd allows one to easily obtain source-file / line-number information of a given address using the class location_ct.

Typedef Documentation

typedef unsigned short int libcwd::location_format_t

The type of the argument of location_format.

This type is the same as alloc_format_t but should only be used together with the bit masks show_objectfile, show_function and show_path.

Function Documentation

location_format_t libcwd::location_format ( location_format_t  format)

Set the output format of location_ct.

This function can be used to specify the format of how a location_ct will be printed when it is written to an ostream. The format is thread-specific: only the calling thread will be influenced.

The argument format is a bit-wise OR-ed value of three possible bit masks: show_function : Include the mangled function name. show_object : Include the name of the shared library or the executable name. show_path : Print the full path of the source file.

the previous value of the format.
char const * libcwd::pc_mangled_function_name ( void const *  addr)

Find the mangled function name of the address addr.

the same pointer that is returned by location_ct::mangled_function_name() on success, otherwise unknown_function_c is returned.

References libcwd::unknown_function_c.

Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.