Commit 89ba430c authored by Simon Marchi's avatar Simon Marchi
Browse files

gdb: move some variables to an inner scope in save_waitstatus

These two variables:

      struct regcache *regcache = get_thread_regcache (tp);
      const address_space *aspace = regcache->aspace ();

are only needed inside the "if".  Getting a thread's regcache is a
somewhat expensive operation, so it's good to avoid it if not necessary.
Move the variable declarations and their initialization to the "if"
scope.

gdb/ChangeLog:

	* infrun.c (save_waitstatus): Move variables to inner scope.

Change-Id: Ief1463728755b4dcc142c0a0a76896e9d594ae84
parent a2443c89
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment