[debuginfo-tests] r219451 - Properly shutdown lldb by invoking SBDebugger_Terminate()

Justin Bogner mail at justinbogner.com
Sun Oct 12 20:24:59 PDT 2014


Adrian Prantl <aprantl at apple.com> writes:
> Author: adrian
> Date: Thu Oct  9 17:16:46 2014
> New Revision: 219451
>
> URL: http://llvm.org/viewvc/llvm-project?rev=219451&view=revLog:
> Properly shutdown lldb by invoking SBDebugger_Terminate()
> rdar://problem/18577039
>
> Modified:
>     debuginfo-tests/trunk/llgdb.py
>
> Modified: debuginfo-tests/trunk/llgdb.py
> URL:
> http://llvm.org/viewvc/llvm-project/debuginfo-tests/trunk/llgdb.py?rev=219451&r1=219450&r2=219451&view=diff==============================================================================
> --- debuginfo-tests/trunk/llgdb.py (original)
> +++ debuginfo-tests/trunk/llgdb.py Thu Oct  9 17:16:46 2014
> @@ -142,12 +142,14 @@ NOTE: There are several resons why this
>              print frame.EvaluateExpression(' '.join(cmd[1:]))
>  
>          elif re.match('^q|(quit)$', cmd[0]):
> +            lldb.SBDebugger_Terminate()
>              sys.exit(0)
>  
>          else:
>              print debugger.HandleCommand(' '.join(cmd))
>  
> -    except SystemExit, e: raise e
> +    except SystemExit, e:
> +        raise e

This is better written like so:

    except SystemExit:
        raise

raise with no arguments preserves the original backtrace, whereas raise
with an argument will give you the original exception but with a
backtrace pointing to this local raise.

>      except:
>          print 'Could not handle the command "%s"' % ' '.join(cmd)
>  
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list