PetscAttachDebuggerErrorHandler

Error handler that attaches a debugger to a running process when an error is detected. This routine is useful for examining variables, etc.

Synopsis

int PetscAttachDebuggerErrorHandler(int line,char* fun,char *file,char* dir,int num,int p,
                                    char* mess,void *ctx)
Not Collective

Input Parameters

line - the line number of the error (indicated by __LINE__)
fun - function where error occured (indicated by __FUNC__)
file - the file in which the error was detected (indicated by __FILE__)
dir - the directory of the file (indicated by __SDIR__)
message - an error text string, usually just printed to the screen
number - the generic error number
p - the specific error number
ctx - error handler context

Options Database Keys

-on_error_attach_debugger [noxterm,dbx,xxgdb,xdb,xldb,gdb] [ -display name] - Activates debugger attachment

Notes

By default the GNU debugger, gdb, is used. Alternatives are dbx andxxgdb,xldb (on IBM rs6000), xdb (on HP-UX).

Most users need not directly employ this routine and the other errorhandlers, but can instead use the simplified interface SETERR, which hasthe calling sequence

    SETERRQ(number,p,message)

Notes for experienced users

Use PetscPushErrorHandler() to set the desired error handler. Thecurrently available PETSc error handlers are
   PetscTraceBackErrorHandler()
   PetscAttachDebuggerErrorHandler()
   PetscAbortErrorHandler()
or you may write your own.

Keywords

attach, debugger, error, handler

See Also

PetscPushErrorHandler(), PetscTraceBackErrorHandler(),
PetscAbortErrorHandler()

Location: src/sys/src/erroradebug.c
System Index
Table of Contents