aboutsummaryrefslogtreecommitdiff
path: root/std/debug.zig
AgeCommit message (Collapse)Author
2019-04-23Go one instruction before the return addressLemonBoy
The return address may not point to an area covered by the debug infos so we hope for the best and decrement the address so that it points to the caller instruction.
2019-04-23Fix silly typoLemonBoy
2019-04-23Fix reading of signed leb128 valuesLemonBoy
2019-04-20fixup and zig fmtAndrew Kelley
2019-04-20Recover symbol infos from DWARF sectionsLemonBoy
2019-04-19Fix parseFormValueConstantLemonBoy
Signed/unsigned confusion made the code fail an assertion sometimes.
2019-04-11A bunch of fixes for the DWARF parser (#2254)Andrew Kelley
* Correct parsing of DWARF line_info section * Fix reading of udata/sdata encoded attributes * Add definition for DW_AT_alignment Even though it's been standardized in DWARF5 some compilers produce it anyway for DWARF4 infos too. * Fix reading of reference attributes * Distinguish between absolute/relative addresses
2019-04-11Add initial support for iOS targets (#2237)Matthew Iannucci
* Add iOS C int sizes... try to hack in iOS DebugInfo * Get rid of ios link check for now * Remove macos linkversion check
2019-04-11Distinguish between absolute/relative addressesLemonBoy
2019-04-11Fix reading of reference attributesLemonBoy
2019-04-11Fix reading of udata/sdata encoded attributesLemonBoy
2019-04-10Correct parsing of DWARF line_info sectionLemonBoy
2019-03-16print a message instead of returning an error when debug info comes from a ↵Sahnvour
source file not found (for example compiled on another computer)
2019-03-16avoid reading LineBlockFragmentHeader at all if the address is not in range, ↵Sahnvour
thus simplifying code and improving speed of execution
2019-03-16allow pdb modules to have no C13 data, this happens if the module is strippedSahnvour
2019-03-16correct padding handling between std.pdb.ModInfo entries in DbiStreamSahnvour
2019-03-15breaking changes to std.mem.Allocator interface APIAndrew Kelley
Before, allocator implementations had to provide `allocFn`, `reallocFn`, and `freeFn`. Now, they must provide only `reallocFn` and `shrinkFn`. Reallocating from a zero length slice is allocation, and shrinking to a zero length slice is freeing. When the new memory size is less than or equal to the previous allocation size, `reallocFn` now has the option to return `error.OutOfMemory` to indicate that the allocator would not be able to take advantage of the new size. For more details see #1306. This commit closes #1306. This commit paves the way to solving #2009. This commit also introduces a memory leak to all coroutines. There is an issue where a coroutine calls the function and it frees its own stack frame, but then the return value of `shrinkFn` is a slice, which is implemented as an sret struct. Writing to the return pointer causes invalid memory write. We could work around it by having a global helper function which has a void return type and calling that instead. But instead this hack will suffice until I rework coroutines to be non-allocating. Basically coroutines are not supported right now until they are reworked as in #1194.
2019-03-02rename std lib files to new conventionAndrew Kelley
2017-12-23move std/debug.zig to a subdirectoryAndrew Kelley
self hosted compiler parser tests do some fuzz testing
2017-12-22explicitly return from blocksAndrew Kelley
instead of last statement being expression value closes #629
2017-12-18wip export rewriteAndrew Kelley
2017-12-12stack traces: support DW_AT_rangesAndrew Kelley
This makes some cases print stack traces where it previously failed.
2017-12-11self-hosted: test all out of memory conditionsAndrew Kelley
2017-12-11refactor debug.global_allocator into mem.FixedBufferAllocatorAndrew Kelley
2017-12-10add self-hosted parsing and rendering to main testsAndrew Kelley
2017-12-06add higher level arg-parsing API + misc. changesAndrew Kelley
* add @noInlineCall - see #640 This fixes a crash in --release-safe and --release-fast modes where the optimizer inlines everything into _start and clobbers the command line argument data. If we were able to verify that the user's code never reads command line args, we could leave off this "no inline" attribute. * add i29 and u29 primitive types. u29 is the type of alignment, so it makes sense to be a primitive. probably in the future we'll make any `i` or `u` followed by digits into a primitive. * add `aligned` functions to Allocator interface * add `os.argsAlloc` and `os.argsFree` so that you can get a `[]const []u8`, do whatever arg parsing you want, and then free it. For now this uses the other API under the hood, but it could be reimplemented to do a single allocation. * add tests to make sure command line argument parsing works.
2017-12-04rename builtin.is_big_endian to builtin.endianAndrew Kelley
See #307
2017-12-03rework enums and unions and their relationship to each otherAndrew Kelley
* @enumTagName renamed to @tagName and it works on enums and union-enums * Remove the EnumTag type. Now there is only enum and union, and the tag type of a union is always an enum. * unions support specifying the tag enum type, and they support inferring an enum tag type. * Enums no longer support field types but they do support setting the tag values. Likewise union-enums when inferring an enum tag type support setting the tag values. * It is now an error for enums and unions to have 0 fields. * switch statements support union-enums closes #618
2017-11-10add a std lib test for reading and writing filesAndrew Kelley
* fix fstat wrong on darwin * move std.debug.global_allocator to std.debug.global_allocator_state and make it private * add std.debug.global_allocator as a pointer (to upgrade your zig code remove the '&')
2017-11-07std.io: introduce buffered I/O and change APIAndrew Kelley
I started working on #465 and made some corresponding std.io API changes. New structs: * std.io.FileInStream * std.io.FileOutStream * std.io.BufferedOutStream * std.io.BufferedInStream Removed: * std.io.File.in_stream * std.io.File.out_stream Now instead of &file.out_stream or &file.in_stream to get access to the stream API for a file, you get it like this: var file_in_stream = io.FileInStream.init(&file); const in_stream = &file_in_stream.stream; var file_out_stream = io.FileOutStream.init(&file); const out_stream = &file_out_stream.stream; This is evidence that we might not need any OOP features - See #130.
2017-10-31breaking change to std.io APIAndrew Kelley
* Merge io.InStream and io.OutStream into io.File * Introduce io.OutStream and io.InStream interfaces - io.File implements both of these * Move mem.IncrementingAllocator to heap.IncrementingAllocator Instead of: ``` %return std.io.stderr.printf("hello\n"); ``` now do: ``` std.debug.warn("hello\n"); ``` To print to stdout, see `io.getStdOut()`. * Rename std.ArrayList.resizeDown to std.ArrayList.shrink.
2017-10-15fix std.io.InStream for windowsAndrew Kelley
now we handle PIPE_BROKEN as an EOF also set up framework for debugging unexpected posix/windows errors
2017-10-09implement os.path.real for windows and update allocator interfaceAndrew Kelley
2017-09-19Stop debug allocator ever panicking (#492)Marc Tiehuis
2017-08-29more alignment improvementsAndrew Kelley
* add alignment capability for fn protos * add @alignCast * fix some ast rendering code * fix some ir rendering code * add error for pointer cast increasing alignment * update allocators in std to correctly align See #37
2017-08-27fixups to linux buildAndrew Kelley
2017-08-26update for llvm 5.0.0rc1Andrew Kelley
2017-08-25unreachable still codegens to unreachable in ReleaseFast test modeAndrew Kelley
closes #430
2017-08-19bit shifting safetyAndrew Kelley
* add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7 * shift operations shift amount parameter type is integer with log2 bit width of other param - This enforces not violating undefined behavior on shift amount >= bit width with the type system * clean up math.log, math.ln, math.log2, math.log10 closes #403
2017-08-08add ptrToInt builtin, remove usize(ptr) castAndrew Kelley
closes #415
2017-06-14progress toward windows hello world workingAndrew Kelley
2017-06-04progress toward hello world without libc in windowsAndrew Kelley
2017-05-19change slicing syntax from ... to ..Andrew Kelley
See #359
2017-05-04std: rename List to ArrayList and re-organize...Andrew Kelley
...the exports of std. closes #356
2017-05-03change while syntaxAndrew Kelley
Old: ``` while (condition; expression) {} ``` New: ``` while (condition) : (expression) {} ``` This is in preparation to allow nullable and error union types as the condition. See #357
2017-05-03remove test and try expressions in favor of if expressionsAndrew Kelley
See #357
2017-05-01make debug safety stuff lazyAndrew Kelley
2017-05-01`@import("builtin")` instead of `@compileVar`Andrew Kelley
See #226 Closes #220
2017-04-26build system: consolidate duplicate code and moreAndrew Kelley
* add ability to add assembly files when building an exe, obj, or lib * add implicit cast from `[N]T` to `?[]const T` (closes #343) * remove link_exe and link_lib in favor of allowing build_exe and build_lib support no root zig source file
2017-04-24update READMEAndrew Kelley