Subversion Repositories pentevo

Rev

Rev 796 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #pragma once
  2. struct MON_LABEL
  3. {
  4.     unsigned char *address;
  5.     unsigned name_offs;
  6. };
  7.  
  8. struct MON_LABELS
  9. {
  10.    MON_LABEL *pairs;
  11.    unsigned n_pairs;
  12.    char *names;
  13.    unsigned names_size;
  14.  
  15.    MON_LABELS() { pairs = nullptr; names = nullptr; n_pairs = names_size = 0; hNewUserLabels = nullptr; }
  16.    ~MON_LABELS() { free(pairs); free(names); stop_watching_labels(); }
  17.  
  18.    unsigned add_name(char *name);
  19.    void clear(unsigned char *start, unsigned size);
  20.    void clear_ram() { clear(RAM_BASE_M, MAX_RAM_PAGES*PAGE); }
  21.    void sort();
  22.  
  23.    char *find(unsigned char *address);
  24.    void add(unsigned char *address, char *name);
  25.    unsigned load(char *filename, unsigned char *base, unsigned size);
  26.  
  27.  
  28.    char xas_errstr[80];
  29.    unsigned char xaspage;
  30.    void find_xas();
  31.  
  32.    enum { MAX_ALASM_LTABLES = 16 };
  33.    char alasm_valid_char[0x100];
  34.    unsigned alasm_found_tables;
  35.    unsigned alasm_offset[MAX_ALASM_LTABLES];
  36.    unsigned alasm_count[MAX_ALASM_LTABLES];
  37.    unsigned alasm_chain_len(unsigned char *page, unsigned offset, unsigned &end);
  38.    void find_alasm();
  39.  
  40.    void import_menu();
  41.    void import_xas();
  42.    void import_alasm(unsigned offset, char *caption);
  43.  
  44.  
  45.    HANDLE hNewUserLabels;
  46.    char userfile[0x200];
  47.    void stop_watching_labels();
  48.    void start_watching_labels();
  49.    void notify_user_labels();
  50.    void import_file();
  51.  
  52. };
  53.  
  54. extern MON_LABELS mon_labels;
  55.  
  56. void load_labels(char *filename, unsigned char *base, unsigned size);
  57. void mon_show_labels();
  58.