mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-31 04:59:55 +00:00 
			
		
		
		
	Merge branch 'bugfix/upd_debug_options' into 'master'
build & tools: update debug options for new GCC Closes GCC-217 See merge request espressif/esp-idf!16956
This commit is contained in:
		| @@ -103,6 +103,9 @@ function(__build_set_default_build_specifications) | |||||||
|                                     "-Wextra" |                                     "-Wextra" | ||||||
|                                     "-Wno-unused-parameter" |                                     "-Wno-unused-parameter" | ||||||
|                                     "-Wno-sign-compare" |                                     "-Wno-sign-compare" | ||||||
|  |                                     # Default is dwarf-5 since GCC 11, fallback to dwarf-4 because of binary size | ||||||
|  |                                     # TODO: IDF-5160 | ||||||
|  |                                     "-gdwarf-4" | ||||||
|                                     # always generate debug symbols (even in release mode, these don't |                                     # always generate debug symbols (even in release mode, these don't | ||||||
|                                     # go into the final binary so have no impact on size |                                     # go into the final binary so have no impact on size | ||||||
|                                     "-ggdb") |                                     "-ggdb") | ||||||
|   | |||||||
| @@ -381,9 +381,7 @@ def load_sections(map_file: TextIO) -> Dict: | |||||||
|             if srcs: |             if srcs: | ||||||
|                 last_src = srcs[-1] |                 last_src = srcs[-1] | ||||||
|                 if last_src['size'] > 0 and last_src['address'] == int(match_line.group('address'), 16): |                 if last_src['size'] > 0 and last_src['address'] == int(match_line.group('address'), 16): | ||||||
|                     if '.comment' != section['name'] and '.debug_str' != section['name'] and\ |                     if section['name'] not in ['.comment', '.debug_str', '.debug_line_str'] and 'rodata' not in last_src['sym_name']: | ||||||
|                             'rodata' not in last_src['sym_name']: |  | ||||||
|  |  | ||||||
|                         raise RuntimeError('Due to overlap with following lines, size of the line set to 0:\n    %s' % dump_src_line(last_src)) |                         raise RuntimeError('Due to overlap with following lines, size of the line set to 0:\n    %s' % dump_src_line(last_src)) | ||||||
|  |  | ||||||
|                     last_src['size'] = 0 |                     last_src['size'] = 0 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Anton Maklakov
					Anton Maklakov