hotspot/src/share/vm/utilities/exceptions.cpp
changeset 24424 2658d7834c6e
parent 22234 da823d78ad65
child 26135 82b516c550f7
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    33 #include "runtime/thread.inline.hpp"
    33 #include "runtime/thread.inline.hpp"
    34 #include "runtime/threadCritical.hpp"
    34 #include "runtime/threadCritical.hpp"
    35 #include "utilities/events.hpp"
    35 #include "utilities/events.hpp"
    36 #include "utilities/exceptions.hpp"
    36 #include "utilities/exceptions.hpp"
    37 
    37 
       
    38 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
    38 
    39 
    39 // Implementation of ThreadShadow
    40 // Implementation of ThreadShadow
    40 void check_ThreadShadow() {
    41 void check_ThreadShadow() {
    41   const ByteSize offset1 = byte_offset_of(ThreadShadow, _pending_exception);
    42   const ByteSize offset1 = byte_offset_of(ThreadShadow, _pending_exception);
    42   const ByteSize offset2 = Thread::pending_exception_offset();
    43   const ByteSize offset2 = Thread::pending_exception_offset();
   234   vsnprintf(msg, max_msg_size, format, ap);
   235   vsnprintf(msg, max_msg_size, format, ap);
   235   msg[max_msg_size-1] = '\0';
   236   msg[max_msg_size-1] = '\0';
   236   va_end(ap);
   237   va_end(ap);
   237   _throw_msg(thread, file, line, h_name, msg);
   238   _throw_msg(thread, file, line, h_name, msg);
   238 }
   239 }
       
   240 
   239 
   241 
   240 // Creates an exception oop, calls the <init> method with the given signature.
   242 // Creates an exception oop, calls the <init> method with the given signature.
   241 // and returns a Handle
   243 // and returns a Handle
   242 Handle Exceptions::new_exception(Thread *thread, Symbol* name,
   244 Handle Exceptions::new_exception(Thread *thread, Symbol* name,
   243                                  Symbol* signature, JavaCallArguments *args,
   245                                  Symbol* signature, JavaCallArguments *args,