Fix: lttng: truncated addresses and offsets on 32-bit builds
[lttng-tools.git] / src / bin / lttng / commands / enable_events.c
index 0704b14756f78ef860b7e283c4e084a4b6f6a40a..30d28cb265b566ede70145f7760fa2c67276e6e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 EfficiOS Inc.
  *
  * SPDX-License-Identifier: GPL-2.0-only
  *
@@ -25,6 +25,7 @@
 /* Mi dependancy */
 #include <common/mi-lttng.h>
 
+#include <lttng/domain-internal.h>
 #include <lttng/event-internal.h>
 
 #include "../command.h"
@@ -129,7 +130,7 @@ static int parse_probe_opts(struct lttng_event *ev, char *opt)
                        ret = CMD_ERROR;
                        goto end;
                }
-               ev->attr.probe.offset = strtoul(s_hex, NULL, 0);
+               ev->attr.probe.offset = strtoull(s_hex, NULL, 0);
                DBG("probe offset %" PRIu64, ev->attr.probe.offset);
                ev->attr.probe.addr = 0;
                goto end;
@@ -163,7 +164,7 @@ static int parse_probe_opts(struct lttng_event *ev, char *opt)
                        ret = CMD_ERROR;
                        goto end;
                }
-               ev->attr.probe.addr = strtoul(s_hex, NULL, 0);
+               ev->attr.probe.addr = strtoull(s_hex, NULL, 0);
                DBG("probe addr %" PRIu64, ev->attr.probe.addr);
                ev->attr.probe.offset = 0;
                memset(ev->attr.probe.symbol_name, 0, LTTNG_SYMBOL_NAME_LEN);
@@ -486,7 +487,7 @@ static int enable_events(char *session_name)
                case LTTNG_DOMAIN_LOG4J:
                case LTTNG_DOMAIN_PYTHON:
                        ERR("Event name exclusions are not yet implemented for %s events",
-                                       get_domain_str(dom.type));
+                                       lttng_domain_type_str(dom.type));
                        ret = CMD_ERROR;
                        goto error;
                case LTTNG_DOMAIN_UST:
@@ -656,7 +657,7 @@ static int enable_events(char *session_name)
                                                goto end;
                                        }
                                        MSG("All %s tracepoints%s are enabled in channel %s for loglevel %s",
-                                                       get_domain_str(dom.type),
+                                                       lttng_domain_type_str(dom.type),
                                                        exclusion_string,
                                                        print_channel_name(channel_name),
                                                        opt_loglevel);
@@ -670,7 +671,7 @@ static int enable_events(char *session_name)
                                                goto end;
                                        }
                                        MSG("All %s tracepoints%s are enabled in channel %s",
-                                                       get_domain_str(dom.type),
+                                                       lttng_domain_type_str(dom.type),
                                                        exclusion_string,
                                                        print_channel_name(channel_name));
                                        free(exclusion_string);
@@ -679,7 +680,7 @@ static int enable_events(char *session_name)
                        case LTTNG_EVENT_SYSCALL:
                                if (opt_kernel) {
                                        MSG("All %s system calls are enabled in channel %s",
-                                                       get_domain_str(dom.type),
+                                                       lttng_domain_type_str(dom.type),
                                                        print_channel_name(channel_name));
                                }
                                break;
@@ -693,7 +694,7 @@ static int enable_events(char *session_name)
                                                goto end;
                                        }
                                        MSG("All %s events%s are enabled in channel %s for loglevel %s",
-                                                       get_domain_str(dom.type),
+                                                       lttng_domain_type_str(dom.type),
                                                        exclusion_string,
                                                        print_channel_name(channel_name),
                                                        opt_loglevel);
@@ -707,7 +708,7 @@ static int enable_events(char *session_name)
                                                goto end;
                                        }
                                        MSG("All %s events%s are enabled in channel %s",
-                                                       get_domain_str(dom.type),
+                                                       lttng_domain_type_str(dom.type),
                                                        exclusion_string,
                                                        print_channel_name(channel_name));
                                        free(exclusion_string);
@@ -1059,7 +1060,7 @@ static int enable_events(char *session_name)
                                case LTTNG_DOMAIN_KERNEL:
                                case LTTNG_DOMAIN_UST:
                                        MSG("%s event %s%s created in channel %s",
-                                               get_domain_str(dom.type),
+                                               lttng_domain_type_str(dom.type),
                                                event_name,
                                                exclusion_string,
                                                print_channel_name(channel_name));
@@ -1072,7 +1073,7 @@ static int enable_events(char *session_name)
                                         * name for agent domains.
                                         */
                                        MSG("%s event %s%s enabled",
-                                               get_domain_str(dom.type),
+                                               lttng_domain_type_str(dom.type),
                                                event_name,
                                                exclusion_string);
                                        break;
This page took 0.026509 seconds and 4 git commands to generate.