/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* Error message and general message handling functions. */
/* NOTE: We assume that most strings passed around this library are
* UTF-8 (modified or standard) and not platform encoding.
* Before sending any strings to the "system" (e.g. OS system
* to make sure that the strings are transformed from UTF-8 to
* the platform encoding accepted by the system.
* UTF-8 and most encodings have simple ASCII or ISO-Latin
* characters as a subset, so in most cases the strings really
* don't need to be converted, but we don't know that easily.
* Parts of messages can be non-ASCII in some cases, so they may
* include classnames, methodnames, signatures, or other pieces
* that could contain non-ASCII characters, either from JNI or
* JVMTI (which both return modified UTF-8 strings).
* (It's possible that the platform encoding IS UTF-8, but we
* assume not, just to be safe).
*
*/
#include <stdarg.h>
#include <errno.h>
#include "util.h"
#include "proc_md.h"
/* Maximim length of a message */
/* Print message in platform encoding (assume all input is UTF-8 safe)
* NOTE: This function is at the lowest level of the call tree.
* Do not use the ERROR* macros here.
*/
static void
{
int len;
/* Fill buffer with single UTF-8 string */
utf8buf[MAX_MESSAGE_LEN] = 0;
/* Convert to platform encoding (ignore errors, dangerous area) */
} else {
/* May be called before NPT is initialized so don't fault */
}
}
/* Print message in platform encoding (assume all input is UTF-8 safe)
* NOTE: This function is at the lowest level of the call tree.
* Do not use the ERROR* macros here.
*/
void
const char *format, ...)
{
}
/* Generate error message */
void
{
if ( gdata->doerrorexit ) {
}
}
/* Print plain message to stdout. */
void
{
}
/* Print assertion error message to stderr. */
void
{
}
}
/* Macro for case on switch, returns string for name. */
/* Mapping of JVMTI errors to their name */
const char *
{
switch (error) {
default: return "ERROR_unknown";
}
}
const char *
eventText(int i)
{
switch ( i ) {
default: return "EVENT_unknown";
}
}
/* Macro for case on switch, returns string for name. */
const char *
{
switch ( serror ) {
default: return "JDWP_ERROR_unknown";
}
}
static int p = 1;
void
do_pause(void)
{
/*LINTED*/
tty_message("DEBUGGING: JDWP pause for PID %d, THREAD %d (0x%x)",
/*LINTED*/
while ( p && timeleft > 0 ) {
}
if ( timeleft <= 0 ) {
tty_message("DEBUGGING: JDWP pause got tired of waiting and gave up.");
}
}