aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-04-29 10:16:28 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-04-29 10:16:28 -0400
commit89ba430c6b4cba43a2e77fe9a103e26e6c96bc12 (patch)
tree8f6f17870ef9a4b291ae0af72ae2cde62ef3dae2 /bfd/som.c
parenta2443c8988a443e802fced3c03dd55b563629afd (diff)
downloadgdb-89ba430c6b4cba43a2e77fe9a103e26e6c96bc12.zip
gdb-89ba430c6b4cba43a2e77fe9a103e26e6c96bc12.tar.gz
gdb-89ba430c6b4cba43a2e77fe9a103e26e6c96bc12.tar.bz2
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
Diffstat (limited to 'bfd/som.c')
0 files changed, 0 insertions, 0 deletions