aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-01-05 18:07:02 +0100
committerPetr Machata <pmachata@redhat.com>2012-08-29 19:02:05 +0200
commit94078ecce3a103c28457e6f90f1e5b0dacc61146 (patch)
tree2067fe27ceac9f9cf166bd523f96e3a8e5e1d891 /common.h
parent000e31195ad4ad30a0c80c93ab57a424e7d8d918 (diff)
downloadltrace-94078ecce3a103c28457e6f90f1e5b0dacc61146.tar.gz
Add expr.c, expr.h, plug in properly
- 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.
Diffstat (limited to 'common.h')
-rw-r--r--common.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/common.h b/common.h
index 9db7e83..0d4d6de 100644
--- a/common.h
+++ b/common.h
@@ -1,3 +1,25 @@
+/*
+ * This file is part of ltrace.
+ * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2010 Joe Damato
+ * Copyright (C) 2009 Juan Cespedes
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
#ifndef COMMON_H
#define COMMON_H
@@ -87,8 +109,6 @@ extern void enque_event(Event * event);
extern void handle_event(Event * event);
extern pid_t execute_program(const char * command, char ** argv);
-extern int display_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info);
-extern void disable_all_breakpoints(Process * proc);
extern void show_summary(void);
@@ -191,4 +211,11 @@ int arch_process_exec(struct Process *proc);
* process startup. */
void arch_dynlink_done(struct Process *proc);
+/* Format VALUE into STREAM. The dictionary of all arguments is given
+ * for purposes of evaluating array lengths and other dynamic
+ * expressions. Returns number of characters outputted, -1 in case of
+ * failure. */
+int format_argument(FILE *stream, struct value *value,
+ struct value_dict *arguments);
+
#endif