src/share/vm/services/diagnosticFramework.cpp

Print this page
rev 3087 : 7141252: Diagnostic Framework Default parser fixes

*** 1,7 **** /* ! * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012NAME, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 59,69 **** } bool DCmdArgIter::next(TRAPS) { if (_len == 0) return false; // skipping spaces ! while (_cursor < _len - 1 && isspace(_buffer[_cursor])) { _cursor++; } // handling end of command line if (_cursor >= _len - 1) { _cursor = _len - 1; --- 59,69 ---- } bool DCmdArgIter::next(TRAPS) { if (_len == 0) return false; // skipping spaces ! while (_cursor < _len - 1 && _buffer[_cursor] == _delim) { _cursor++; } // handling end of command line if (_cursor >= _len - 1) { _cursor = _len - 1;
*** 71,82 **** --- 71,84 ---- _key_len = 0; _value_addr = &_buffer[_len - 1]; _value_len = 0; return false; } + // extracting first item, argument or option name _key_addr = &_buffer[_cursor]; + while (_cursor <= _len - 1 && _buffer[_cursor] != '=' && _buffer[_cursor] != _delim) { // argument can be surrounded by single or double quotes if (_buffer[_cursor] == '\"' || _buffer[_cursor] == '\'') { _key_addr++; char quote = _buffer[_cursor];