aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/utilities
diff options
context:
space:
mode:
authorrdurbin <none@none>2013-05-17 08:51:46 -0700
committerrdurbin <none@none>2013-05-17 08:51:46 -0700
commit37cab410edbffd6cfe4c3a5edeed0ab50ca7e94e (patch)
tree9e90fb2a2a1abb1bb70e1dae60db77d4f95c31f8 /src/share/vm/utilities
parent1519d8e5d895bc29b87d5b320d7bdbd8eb44bb9f (diff)
7145527: sscanf must use a length in the format string
Summary: Remove dead code containing last call to scanf with no string length specifier Reviewed-by: dcubed, coleenp
Diffstat (limited to 'src/share/vm/utilities')
-rw-r--r--src/share/vm/utilities/debug.cpp148
1 files changed, 0 insertions, 148 deletions
diff --git a/src/share/vm/utilities/debug.cpp b/src/share/vm/utilities/debug.cpp
index a675c27bf..1062b525f 100644
--- a/src/share/vm/utilities/debug.cpp
+++ b/src/share/vm/utilities/debug.cpp
@@ -665,152 +665,4 @@ void help() {
tty->print_cr(" ndebug() - undo debug");
}
-#if 0
-
-// BobV's command parser for debugging on windows when nothing else works.
-
-enum CommandID {
- CMDID_HELP,
- CMDID_QUIT,
- CMDID_HSFIND,
- CMDID_PSS,
- CMDID_PS,
- CMDID_PSF,
- CMDID_FINDM,
- CMDID_FINDNM,
- CMDID_PP,
- CMDID_BPT,
- CMDID_EXIT,
- CMDID_VERIFY,
- CMDID_THREADS,
- CMDID_ILLEGAL = 99
-};
-
-struct CommandParser {
- char *name;
- CommandID code;
- char *description;
-};
-
-struct CommandParser CommandList[] = {
- (char *)"help", CMDID_HELP, " Dump this list",
- (char *)"quit", CMDID_QUIT, " Return from this routine",
- (char *)"hsfind", CMDID_HSFIND, "Perform an hsfind on an address",
- (char *)"ps", CMDID_PS, " Print Current Thread Stack Trace",
- (char *)"pss", CMDID_PSS, " Print All Thread Stack Trace",
- (char *)"psf", CMDID_PSF, " Print All Stack Frames",
- (char *)"findm", CMDID_FINDM, " Find a Method* from a PC",
- (char *)"findnm", CMDID_FINDNM, "Find an nmethod from a PC",
- (char *)"pp", CMDID_PP, " Find out something about a pointer",
- (char *)"break", CMDID_BPT, " Execute a breakpoint",
- (char *)"exitvm", CMDID_EXIT, "Exit the VM",
- (char *)"verify", CMDID_VERIFY, "Perform a Heap Verify",
- (char *)"thread", CMDID_THREADS, "Dump Info on all Threads",
- (char *)0, CMDID_ILLEGAL
-};
-
-
-// get_debug_command()
-//
-// Read a command from standard input.
-// This is useful when you have a debugger
-// which doesn't support calling into functions.
-//
-void get_debug_command()
-{
- ssize_t count;
- int i,j;
- bool gotcommand;
- intptr_t addr;
- char buffer[256];
- nmethod *nm;
- Method* m;
-
- tty->print_cr("You have entered the diagnostic command interpreter");
- tty->print("The supported commands are:\n");
- for ( i=0; ; i++ ) {
- if ( CommandList[i].code == CMDID_ILLEGAL )
- break;
- tty->print_cr(" %s \n", CommandList[i].name );
- }
-
- while ( 1 ) {
- gotcommand = false;
- tty->print("Please enter a command: ");
- count = scanf("%s", buffer) ;
- if ( count >=0 ) {
- for ( i=0; ; i++ ) {
- if ( CommandList[i].code == CMDID_ILLEGAL ) {
- if (!gotcommand) tty->print("Invalid command, please try again\n");
- break;
- }
- if ( strcmp(buffer, CommandList[i].name) == 0 ) {
- gotcommand = true;
- switch ( CommandList[i].code ) {
- case CMDID_PS:
- ps();
- break;
- case CMDID_PSS:
- pss();
- break;
- case CMDID_PSF:
- psf();
- break;
- case CMDID_FINDM:
- tty->print("Please enter the hex addr to pass to findm: ");
- scanf("%I64X", &addr);
- m = (Method*)findm(addr);
- tty->print("findm(0x%I64X) returned 0x%I64X\n", addr, m);
- break;
- case CMDID_FINDNM:
- tty->print("Please enter the hex addr to pass to findnm: ");
- scanf("%I64X", &addr);
- nm = (nmethod*)findnm(addr);
- tty->print("findnm(0x%I64X) returned 0x%I64X\n", addr, nm);
- break;
- case CMDID_PP:
- tty->print("Please enter the hex addr to pass to pp: ");
- scanf("%I64X", &addr);
- pp((void*)addr);
- break;
- case CMDID_EXIT:
- exit(0);
- case CMDID_HELP:
- tty->print("Here are the supported commands: ");
- for ( j=0; ; j++ ) {
- if ( CommandList[j].code == CMDID_ILLEGAL )
- break;
- tty->print_cr(" %s -- %s\n", CommandList[j].name,
- CommandList[j].description );
- }
- break;
- case CMDID_QUIT:
- return;
- break;
- case CMDID_BPT:
- BREAKPOINT;
- break;
- case CMDID_VERIFY:
- verify();;
- break;
- case CMDID_THREADS:
- threads();;
- break;
- case CMDID_HSFIND:
- tty->print("Please enter the hex addr to pass to hsfind: ");
- scanf("%I64X", &addr);
- tty->print("Calling hsfind(0x%I64X)\n", addr);
- hsfind(addr);
- break;
- default:
- case CMDID_ILLEGAL:
- break;
- }
- }
- }
- }
- }
-}
-#endif
-
#endif // !PRODUCT