~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/resolve_stack_dump.cc

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
 
21
 
 
22
#include <cstdio>
 
23
#include <cerrno>
 
24
 
21
25
#include "drizzled/charset_info.h"
22
26
#include "drizzled/internal/my_sys.h"
23
27
#include "drizzled/internal/m_string.h"
24
 
#include <errno.h>
25
28
#include "drizzled/my_getopt.h"
26
 
#include <stdio.h>
 
29
 
 
30
using namespace drizzled;
27
31
 
28
32
#define INIT_SYM_TABLE  4096
29
33
#define INC_SYM_TABLE  4096
31
35
#define DUMP_VERSION "1.4"
32
36
#define HEX_INVALID  (unsigned char)255
33
37
 
34
 
extern "C" bool get_one_option(int optid, const struct my_option *, char *);
35
 
 
36
38
typedef struct sym_entry
37
39
{
38
40
  char symbol[MAX_SYM_SIZE];
63
65
 
64
66
static void print_version(void)
65
67
{
66
 
  printf("%s  Ver %s Distrib %s, for %s-%s (%s)\n",my_progname,DUMP_VERSION,
 
68
  printf("%s  Ver %s Distrib %s, for %s-%s (%s)\n",internal::my_progname,DUMP_VERSION,
67
69
         VERSION,HOST_VENDOR,HOST_OS,HOST_CPU);
68
70
}
69
71
 
75
77
  printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
76
78
  printf("Resolve numeric stack strace dump into symbols.\n\n");
77
79
  printf("Usage: %s [OPTIONS] symbols-file [numeric-dump-file]\n",
78
 
         my_progname);
 
80
         internal::my_progname);
79
81
  my_print_help(my_long_options);
80
82
  my_print_variables(my_long_options);
81
83
  printf("\n\
88
90
{
89
91
  va_list args;
90
92
  va_start(args, fmt);
91
 
  fprintf(stderr, "%s: ", my_progname);
 
93
  fprintf(stderr, "%s: ", internal::my_progname);
92
94
  vfprintf(stderr, fmt, args);
93
95
  fprintf(stderr, "\n");
94
96
  va_end(args);
96
98
}
97
99
 
98
100
 
99
 
bool get_one_option(int optid, const struct my_option *, char *)
 
101
static bool get_one_option(int optid, const struct my_option *, char *)
100
102
{
101
103
  switch(optid) {
102
104
  case 'V':