Commit 8dc3273e authored by Simon Marchi's avatar Simon Marchi
Browse files

Use get_thread_regcache instead of get_current_regcache in post_create_inferior

In post_create_inferior, we get the current thread using the
inferior_thread function and store it in `thr`.  We then call
get_current_regcache immediately after, which does:

  return get_thread_regcache (inferior_thread ());

This patch makes post_create_inferior use get_thread_regcache, passing
`thr`, saving an unnecessary inferior_thread call.

gdb/ChangeLog:

	* infcmd.c (post_create_inferior): Use get_thread_regcache
	instead of get_current_regcache.
parent 0d1cc75d
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