source: mainline/kernel/generic/meson.build@ 001957b6

topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 001957b6 was 2fbb42f, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 2 years ago

Add printing of file names and line numbers in stacktraces

Uses DWARF ¾/5 .debug_line section (originally intended
to only support DWARF 5, but GCC emits lower versioned sections
regardless of command line arguments on some platforms for some
reason, so generic support it is).

Also adds a whole lot of definitions for various DWARF constants
I expect to be useful in the future.

The quickest way to test this probably is to run test fault1
in kernel console.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1#
2# Copyright (c) 2019 Jiří Zárevúcky
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29# Generic kernel sources
30generic_src = []
31
32# Generic kernel sources that are instrumented when CONFIG_TRACE is enabled.
33# Must be disjoint with generic_src.
34instrumentable_src = []
35
36
37generic_src += files(
38 'src/adt/bitmap.c',
39 'src/adt/hash_table.c',
40 'src/adt/list.c',
41 'src/adt/odict.c',
42 'src/cap/cap.c',
43 'src/console/chardev.c',
44 'src/console/console.c',
45 'src/console/prompt.c',
46 'src/cpu/cpu_mask.c',
47 'src/ddi/irq.c',
48 'src/debug/line.c',
49 'src/debug/names.c',
50 'src/debug/panic.c',
51 'src/debug/profile.c',
52 'src/debug/sections.c',
53 'src/debug/stacktrace.c',
54 'src/debug/symtab.c',
55 'src/debug/util.c',
56 'src/ipc/event.c',
57 'src/ipc/ipc.c',
58 'src/ipc/ipcrsc.c',
59 'src/ipc/irq.c',
60 'src/ipc/ops/conctmeto.c',
61 'src/ipc/ops/concttome.c',
62 'src/ipc/ops/dataread.c',
63 'src/ipc/ops/datawrite.c',
64 'src/ipc/ops/debug.c',
65 'src/ipc/ops/pagein.c',
66 'src/ipc/ops/sharein.c',
67 'src/ipc/ops/shareout.c',
68 'src/ipc/ops/stchngath.c',
69 'src/ipc/sysipc.c',
70 'src/ipc/sysipc_ops.c',
71 'src/lib/elf.c',
72 'src/lib/gsort.c',
73 'src/lib/halt.c',
74 'src/lib/mem.c',
75 'src/lib/memfnc.c',
76 'src/lib/ra.c',
77 'src/lib/rd.c',
78 'src/lib/str.c',
79 'src/lib/strtol.c',
80 'src/lib/str_error.c',
81 'src/lib/ubsan.c',
82 'src/log/log.c',
83 'src/main/shutdown.c',
84 'src/main/uinit.c',
85 'src/main/version.c',
86 'src/mm/backend_anon.c',
87 'src/mm/backend_elf.c',
88 'src/mm/backend_phys.c',
89 'src/mm/backend_user.c',
90 'src/mm/km.c',
91 'src/mm/malloc.c',
92 'src/mm/reserve.c',
93 'src/preempt/preemption.c',
94 'src/printf/printf.c',
95 'src/printf/printf_core.c',
96 'src/printf/snprintf.c',
97 'src/printf/vprintf.c',
98 'src/printf/vsnprintf.c',
99 'src/proc/program.c',
100 'src/proc/scheduler.c',
101 'src/proc/task.c',
102 'src/proc/thread.c',
103 'src/security/perm.c',
104 'src/smp/ipi.c',
105 'src/smp/smp.c',
106 'src/synch/condvar.c',
107 'src/synch/irq_spinlock.c',
108 'src/synch/mutex.c',
109 'src/synch/semaphore.c',
110 'src/synch/smc.c',
111 'src/synch/spinlock.c',
112 'src/synch/syswaitq.c',
113 'src/synch/waitq.c',
114 'src/syscall/copy.c',
115 'src/syscall/syscall.c',
116 'src/sysinfo/stats.c',
117 'src/time/clock.c',
118 'src/time/delay.c',
119 'src/time/timeout.c',
120)
121
122instrumentable_src += files(
123 'src/cpu/cpu.c',
124 'src/ddi/ddi.c',
125 'src/interrupt/interrupt.c',
126 'src/main/kinit.c',
127 'src/main/main.c',
128 'src/mm/as.c',
129 'src/mm/frame.c',
130 'src/mm/page.c',
131 'src/mm/slab.c',
132 'src/mm/tlb.c',
133 'src/proc/current.c',
134 'src/sysinfo/sysinfo.c',
135)
136
137## Kernel console support
138#
139
140if CONFIG_KCONSOLE
141 generic_src += files('src/console/cmd.c')
142 instrumentable_src += files('src/console/kconsole.c')
143endif
144
145## Udebug interface sources
146#
147
148if CONFIG_UDEBUG
149 generic_src += files(
150 'src/ipc/kbox.c',
151 'src/udebug/udebug.c',
152 'src/udebug/udebug_ops.c',
153 'src/udebug/udebug_ipc.c',
154 )
155endif
Note: See TracBrowser for help on using the repository browser.