Age | Commit message (Collapse) | Author |
|
- This cleans up a lot of stuff. The actual substance is addition of
account_current_callstack in handle_event.c (which however uses
those cleaned-up interfaces).
- trace-exec.exp was extended to check that the exec syscall can be
seen in -c output. That's one of the symptoms of what this fixes.
- This hides dict_opt_c in summary.c. It also gets rid of the global
variable current_time_spent--instead, the information is passed via
a function argument in a struct timedelta (so that we never confuse
absolute time with relative). callstack_element.time_spent was renamed
to .enter_time, as that is what it has always been.
|
|
|
|
- The intention here is to allow matches of libc.so.conf for
libc.so.6. Typically different sonames imply different binary
interfaces, but for libc, we know that most interfaces won't change.
|
|
- This was always supposed to happen, but did not by omission.
|
|
|
|
- This should be used for per-breakpoint customization of how return
breakpoints are constructed. Hopefully it will be possible to use
this to implement the address mangling that the ARM backed currently
has to do.
|
|
- This symbol library is still special in that symbols are created on
demand and never actually added. It just serves as a link to
protolibrary with system call prototypes, and has a name (SYS).
- Prototypes for system calls were moved to a dedicated prototype
library called syscalls.conf.
- Because it's undesirable to look up syscall prototypes in anything
but the dedicated syscall protolib, prototype.c/.h now understand
that some lookups shouldn't be done recursively (and so we never
pick the definition from -F file that just happens to have the same
name as a system call). The good thing is that now libraries can
actually use symbols named SYS_something without clashing with
system call prototypes.
- One test case needed to be updated, because we now display system
calls as something@SYS instead of SYS_something.
|
|
|
|
- The only interesting use seems to be in output.c, but there we assume
we are working with top-of-callstack anyway, and store fetch context
there, so we can simply fetch the return address this way as well.
|
|
- Drop what amounts to global variable thumb_mode from struct process
- Thumb mode is encoded to address. That means that the code in
callstack_push_symfunc and insert_breakpoint has to assume that
what comes from get_return_address is mangled, and needs to go
through creating the breakpoint and then looking at its address.
That's awkward, and we should come up with a better API.
|
|
- This is hopefully more idiomatic. It also doesn't suffer of
use-after-free as the old version did.
|
|
- The previous conditions also used the wrong operator.
- While there, fix a number of typos in variable names.
|
|
|
|
There is some bookkeeping that needs to be done even when we won't be
able to trace the cloned process.
|
|
This needs to be handled differently on non-Linux platforms.
|
|
This is for consistency with other structures, and ultimately with
Linux coding style. The typedef ("Process") was dropped as well for
this reason.
This opportunity was used to fix coding style around the impacted
lines.
|
|
|
|
At the same time publish that function. Eventually the whole push/pop
logic should be moved to a separate module.
|
|
When functions return we check if the symbol went from
unresolved to resolved and if the resolved address
differs from the unresolved one. If so, we add a new
breakpoint at the resolved address.
This is not thread-safe.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
|
|
when -S and -T are specified and if the system call spans
a second boundary, the reported time in the system call
was too large by precisely 2 seconds
Signed-off-by: Paul Buerger <pbuerger@avetec.org>
|
|
From my conversation with Petr Machata:
>>> [ breakpoints.c ]
>>>
>>> MIPS arch has no own "breakpoints.c".
>>> IIRC sth, was wrong with "list_of_symbols" in
>>> enable_all_breakpoints()... "Process" has no member "list_of_symbols",
>>> so cut off the mips-ifdef part.
>>> Just testing compiles or not.
>>
>> Cutting this actually seems reasonable. There was a similar ifdef for
>> PPC, and that is now gone as well (and PPC works fine). I believe
>> ltrace now handles delaying breakpoint enablement.
>>
>>> [ handle_event.c ]
>>>
>>> Same as for breakpoints.c cut off the mips-ifdef, seen
>>> "list_of_symbols" errors in handle_breakpoint().
>>
>> Hmm, that seems like an implementation of the delayed start. I think
>> this can be removed as well, with the same rationale as above.
These two should probably be in a patch by themselves.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
|
|
Petr Machata says to me:
> Fix "pred" uninitialized in pending_new_remove().
That should go into a separate patch. It's a good catch, but
conceptually has nothing to do with cleaning up MIPS.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
|
|
|
|
|
|
|
|
Rich parameter formatting is still very broken, but now at least we pass
most test cases.
|
|
|
|
- this is now a thin wrapper over gimme_arg, ideally the backends will
eventually use this right interface
- in display_args.c, strip one layer of pointer wrapping, which is now
done in output.c
|
|
- in callstack_pop, we don't free arch_ptr. That's because this doesn't
get copied over the clone. It's a mere coincidence that fork() doesn't
need to save register arguments, and this works.
- added copyright notices to files that this touches. This is based on
git blame. Only contributors of 10+ lines are added
- test suite adjusted to not include "void" type as "don't show this int".
Back ends in general need to know the exact type, so this never worked
anyway.
|
|
error is not standard so it has no business being used in generic code.
The linux-gnu back end is useful for android, and that doesn't have that
interface either.
|
|
Presence in singly-linked list strongly indicates that process is heap
allocated, and that if we are about to stop tracing it, we should also
reclaim the memory.
|
|
At least not this way, the idea itself is still attractive.
|
|
When breakpoints is deleted ultimately, we can't call
continue_after_breakpoint, and therefore IP doesn't get adjusted. Do this
explicitly in generic code for such cases.
|
|
(Which may actually hold sometimes, but generally won't.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- the one outstanding use was a bug, clone_process already adds the process
by the way of process_bare_init
|
|
- Breakpoints on PPC64 are newly handled as proper PLT breakpoints
|
|
- or, as of now, it's used to decide whether or not we should display
"unexpected breakpoint" messages
|
|
- instead of creating them, keeping them around, and then just not enabling
breakpoints for them
|
|
- the default might become "*" in future, but keep things more or less
the same as they always were for now
|
|
|
|
|
|
- called instead of continue_after_breakpoint, which remains the default
action if the callback is not defined
|