Hi Nick, On 10/22/2015 04:07 PM, Nick Clifton wrote:
Sometimes gcc can generate instructions out of order with respect to lines of source code, and this can lead to problems for debuggers. For example, consider this source code snippet:v = 0; /* Line 31 */ goto b; /* Line 32 */ a: v++; /* Line 33 */ b: if (v < 3) goto a; /* Line 34 */
What has happened is that gcc has generated a NOP instruction to be the destination of the goto on line 34 - ie the label a: - but rather than associate it with line 33, it has associated it with line 34. This means that line 34 now appears twice in the line number table.
Could you point me at the code generating these NOPs (and maybe a testcase)? Also, is this the only case you know of or are there others?
Bernd
