Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #1679

Closed
Open
Created Sep 02, 2017 by James Willenbring@jmwilleMaintainer

Teuchos: how to debug with TEUCHOS_STANDARD_CATCH_MACROS

Created by: aprokop

@teuchos @bartlettroscoe

Typically, writing a test involves wrapping the code in the macro like this:

bool success = true;
bool verbose = true;
try {
  // your code
}
TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success);
return ( success ? EXIT_SUCCESS : EXIT_FAILURE );

This works fine. However, when you have a bug in the code which throws an exception, you cannot use a debugger in the standard mode to get the backtrace as the exception is going to be caught by Teuchos.

The only workaround I'm aware is to try doing something with catch throw in gdb. However, this seems quite hard.

I wonder if it's possible for Teuchos to address this issue. One thing that comes to mind is that we could add an additional parameter to the macro or create a new macro with extra argument. If that parameter is true, we don't catch any exceptions. If it's false, we exhibit the standard behavior.

Assignee
Assign to
Time tracking