There are two ways that I know of.
The first is viewing the assembly code for your production build within MPLAB X IDE v5.10
- Open the Project Properties.
- Select the "Loading" node under "Conf: [your current configuration]".
- Check "Load Symbols when Programming or building for production".
Then "Clean and Build" and once finished go to Window -> Debugging -> Output -> Disassembly Listing File
If you are doing this for debugging purposes, clean and build your project for debugging and access the disassembly listing file the same way. No need to change your project settings in this case.
The second way is by examining the .o file with a text editor outside of MPLAB. To do this, add the -S option to xc32-gcc like so:
The build will fail in the IDE but the .o files will be generated and can be found in the "project name".X\build\"configuration name"\production\ _ext folder and you should be able to read them with a text editor (Notepad, Wordpad, Emacs, vim, etc)