mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-09-27 08:59:28 +02:00
Default to non-verbose mode in Ltest-cxx-exceptions
This commit is contained in:
parent
cc6cd621ea
commit
d3fd3dc3ca
1 changed files with 8 additions and 6 deletions
|
@ -21,18 +21,17 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libunwind.h>
|
#include <libunwind.h>
|
||||||
|
#include "compiler.h"
|
||||||
|
|
||||||
#define panic(args...) \
|
#define panic(args...) \
|
||||||
{ fprintf (stderr, args); exit (-1); }
|
{ fprintf (stderr, args); exit (-1); }
|
||||||
|
|
||||||
|
static int verbose;
|
||||||
|
|
||||||
struct Test
|
struct Test
|
||||||
{
|
{
|
||||||
public: // --- ctor/dtor ---
|
public: // --- ctor/dtor ---
|
||||||
|
@ -55,13 +54,16 @@ extern "C" void bar()
|
||||||
throw 5;
|
throw 5;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Test t;
|
Test t;
|
||||||
printf("Throwing an int\n");
|
if (verbose)
|
||||||
|
printf("Throwing an int\n");
|
||||||
throw 6;
|
throw 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main(int argc, char **argv UNUSED)
|
||||||
{
|
{
|
||||||
|
if (argc > 1)
|
||||||
|
verbose = 1;
|
||||||
try {
|
try {
|
||||||
Test t;
|
Test t;
|
||||||
bar();
|
bar();
|
||||||
|
|
Loading…
Reference in a new issue