OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 ExternalReference ExternalReference::debug_step_in_fp_address() { | 898 ExternalReference ExternalReference::debug_step_in_fp_address() { |
899 return ExternalReference(Debug::step_in_fp_addr()); | 899 return ExternalReference(Debug::step_in_fp_addr()); |
900 } | 900 } |
901 #endif | 901 #endif |
902 | 902 |
903 | 903 |
904 void PositionsRecorder::RecordPosition(int pos) { | 904 void PositionsRecorder::RecordPosition(int pos) { |
905 ASSERT(pos != RelocInfo::kNoPosition); | 905 ASSERT(pos != RelocInfo::kNoPosition); |
906 ASSERT(pos >= 0); | 906 ASSERT(pos >= 0); |
907 state_.current_position = pos; | 907 state_.current_position = pos; |
| 908 #ifdef ENABLE_GDBJIT_INTERFACE |
| 909 if (gdbjit_lineinfo_ != NULL) { |
| 910 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); |
| 911 } |
| 912 #endif |
908 } | 913 } |
909 | 914 |
910 | 915 |
911 void PositionsRecorder::RecordStatementPosition(int pos) { | 916 void PositionsRecorder::RecordStatementPosition(int pos) { |
912 ASSERT(pos != RelocInfo::kNoPosition); | 917 ASSERT(pos != RelocInfo::kNoPosition); |
913 ASSERT(pos >= 0); | 918 ASSERT(pos >= 0); |
914 state_.current_statement_position = pos; | 919 state_.current_statement_position = pos; |
| 920 #ifdef ENABLE_GDBJIT_INTERFACE |
| 921 if (gdbjit_lineinfo_ != NULL) { |
| 922 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); |
| 923 } |
| 924 #endif |
915 } | 925 } |
916 | 926 |
917 | 927 |
918 bool PositionsRecorder::WriteRecordedPositions() { | 928 bool PositionsRecorder::WriteRecordedPositions() { |
919 bool written = false; | 929 bool written = false; |
920 | 930 |
921 // Write the statement position if it is different from what was written last | 931 // Write the statement position if it is different from what was written last |
922 // time. | 932 // time. |
923 if (state_.current_statement_position != state_.written_statement_position) { | 933 if (state_.current_statement_position != state_.written_statement_position) { |
924 EnsureSpace ensure_space(assembler_); | 934 EnsureSpace ensure_space(assembler_); |
(...skipping 11 matching lines...) Expand all Loading... |
936 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 946 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
937 state_.written_position = state_.current_position; | 947 state_.written_position = state_.current_position; |
938 written = true; | 948 written = true; |
939 } | 949 } |
940 | 950 |
941 // Return whether something was written. | 951 // Return whether something was written. |
942 return written; | 952 return written; |
943 } | 953 } |
944 | 954 |
945 } } // namespace v8::internal | 955 } } // namespace v8::internal |
OLD | NEW |