Skip to content
Commit 81dd93c8 authored by Lancelot SIX's avatar Lancelot SIX
Browse files

gdb/amd-dbgapi-target: Use inf param in detach



Current implementation of amd_dbgapi_target::detach (inferior *, int)
does the following:

  remove_breakpoints_inf (current_inferior ());
  detach_amd_dbgapi (inf);
  beneath ()->detach (inf, from_tty);

I find that using a mix of `current_inferior ()` and `inf` disturbing.
At this point, we know that both are the same (target_detach does assert
that `inf == current_inferior ()` before calling target_ops::detach).

To improve consistency, this patch replaces `current_inferior ()` with
`inf` in amd_dbgapi_target::detach.

Change-Id: I01b7ba2e661c25839438354b509d7abbddb7c5ed
Approved-By: default avatarPedro Alves <pedro@palves.net>
parent 0d332f11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment