mingw64-filesystem/mingw-objdump-srcfiles
Ralf Habacker f9169a1ad9 - Update to version 20250220
- mingw64.macros:
  * Add parameter '-N' to %_mingw64_debug_package
    to be able to specify a full package name, which is required
    by the wine package
  * Add parameter '-C' to %_mingw64_debug_package to be able
    to add a Conflicts tag, which is required
    by the wine package
  * In %_mingw64_debug_package use actual directory to find
    the debuginfo files list to be in sync with the native
    debug package

OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=172
2025-02-21 09:00:04 +00:00

34 lines
664 B
Bash

#!/bin/sh
# SPDX-FileCopyrightText: 2022 Jan Engelhardt <jengelh@inai.de>
# SPDX-FileCopyrightText: 2022 Ralf Habacker <ralf.habacker@freenet.de>
# SPDX-License-Identifier: GPL-2.0-or-later
# get source filenames from dwarf debug sections
gawk '
BEGIN { state = 0 }
state == 1 && $2 ~ /DW_AT_name/ {
atname = $NF
}
state == 1 && $2 ~ /DW_AT_comp_dir/ {
atdir = $NF
# atname is absolute
if (atname ~ /^\//) {
print atname
state = 0
} else if (atdir != "" && atname != "") {
print atdir "/" atname
state = 0
}
}
state == 0 && $0 ~ /DW_TAG_compile_unit/ {
state = 1
atdir = ""
atname = ""
}
'