]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/c-lang.c
gdb
[thirdparty/binutils-gdb.git] / gdb / c-lang.c
index a978b17ebc4da498ee01fbfcb63d67a6b3030a84..067e42985afa60aa365b5232b35751840854aa5c 100644 (file)
@@ -86,7 +86,8 @@ c_printchar (int c, struct ui_file *stream)
 
 void
 c_printstr (struct ui_file *stream, const gdb_byte *string,
-           unsigned int length, int width, int force_ellipses)
+           unsigned int length, int width, int force_ellipses,
+           const struct value_print_options *options)
 {
   unsigned int i;
   unsigned int things_printed = 0;
@@ -108,7 +109,7 @@ c_printstr (struct ui_file *stream, const gdb_byte *string,
       return;
     }
 
-  for (i = 0; i < length && things_printed < print_max; ++i)
+  for (i = 0; i < length && things_printed < options->print_max; ++i)
     {
       /* Position of the character we are examining
          to see whether it is repeated.  */
@@ -137,11 +138,11 @@ c_printstr (struct ui_file *stream, const gdb_byte *string,
          ++reps;
        }
 
-      if (reps > repeat_count_threshold)
+      if (reps > options->repeat_count_threshold)
        {
          if (in_quotes)
            {
-             if (inspect_it)
+             if (options->inspect_it)
                fputs_filtered ("\\\", ", stream);
              else
                fputs_filtered ("\", ", stream);
@@ -150,14 +151,14 @@ c_printstr (struct ui_file *stream, const gdb_byte *string,
          LA_PRINT_CHAR (current_char, stream);
          fprintf_filtered (stream, _(" <repeats %u times>"), reps);
          i = rep1 - 1;
-         things_printed += repeat_count_threshold;
+         things_printed += options->repeat_count_threshold;
          need_comma = 1;
        }
       else
        {
          if (!in_quotes)
            {
-             if (inspect_it)
+             if (options->inspect_it)
                fputs_filtered ("\\\"", stream);
              else
                fputs_filtered ("\"", stream);
@@ -171,7 +172,7 @@ c_printstr (struct ui_file *stream, const gdb_byte *string,
   /* Terminate the quotes if necessary.  */
   if (in_quotes)
     {
-      if (inspect_it)
+      if (options->inspect_it)
        fputs_filtered ("\\\"", stream);
       else
        fputs_filtered ("\"", stream);