How to determine which pins_arduino.h file is used? For some applications I need access to the registers that control the output/input and high/low state of pins.  For example pin 10 on a adalogger is PORTB with a mask of _BV(6).  This information can be found in pins_arduino.h.  For some boards many variants get installed.  I turned on verbose compiling and looked through the output there as well as looking through boards.txt and platform.txt.  In that output I see an include to a directory with a pins_arduino.h file but there is nothing in that file but a definition for BUILTIN_LED.

When I run a function like digitalWrite(13,HIGH); how does it know which registers to use for pin 13?  Since my board has this pin, and digitalWrite(13, HIGH); makes an LED light up ... it's working.
In the boards.txt file for the core in question you have a line for each board:

xxxx.build.variant=yyyy


where yyyy is the name of the folder in variants for the board.

For instance, the Uno, has:

uno.build.variant=standard


which relates to:

variants/standard


with the pins_arduino.h file in it for that board.