How to determine which pins_arduino.h file is used?
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.