/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <procfs.h>
#include <libelf.h>
#include <stdarg.h>
#include <proc_service.h>
#include "rdb.h"
#include "disasm.h"
#if !defined(_LP64)
static void
{
}
#endif
static void
{
int pauxvfd;
perr("open auxv");
perr("stat auxv");
perr("gldb: reading auxv");
#if defined(_LP64)
else
#endif
#if defined(_LP64)
procp->pp_ldsobase =
else
#endif
#if defined(_LP64)
procp->pp_execphdr =
else
#endif
}
}
}
{
perr("psi: data model");
#if !defined(_LP64)
perr("psi: run 64-bit rdb to debug a 64-bit process");
#endif
&(procp->pp_ldsomap));
&(procp->pp_execmap));
exit(1);
}
/*
* For those architectures that increment the PC on
* a breakpoint fault we enable the PR_BPTADJ adjustments.
*/
perr("psinit: PCSET(PR_BTPADJ)");
/*
* Set breakpoints for special handshakes between librtld_db.so
* and the debugger. These include:
* PREINIT - before .init processing.
* POSTINIT - after .init processing
* DLACTIVITY - link_maps status has changed
*/
FLG_BP_RDPREINIT) != RET_OK)
"psi: failed to set BP for preinit at: 0x%lx\n",
} else
"preinit\n");
FLG_BP_RDPOSTINIT) != RET_OK)
"psi: failed to set BP for postinit at: 0x%lx\n",
} else
"postinit\n");
FLG_BP_RDDLACT) != RET_OK)
"psi: failed to set BP for dlact at: 0x%lx\n",
} else
return (RET_OK);
}
{
(void) delete_all_breakpoints(ph);
return (RET_OK);
}
{
return (PS_OK);
}
{
return (PS_ERR);
return (PS_OK);
}
{
return (PS_ERR);
return (PS_OK);
}
{
return (PS_ERR);
return (PS_OK);
}
{
return (PS_ERR);
return (PS_ERR);
#if defined(_LP64)
#else
#endif
return (PS_OK);
}
{
return (PS_ERR);
return (PS_ERR);
return (PS_OK);
}
{
int lwpfd;
return (PS_ERR);
return (PS_ERR);
return (PS_OK);
}
void
{
/*
* Unable to open log file - default to stderr.
*/
"redirected to stderr", log_fname);
}
}
}
/* ARGSUSED0 */
{
return (PS_ERR);
}